- Timestamp:
- 2016-02-25T00:50:30+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r9067 r9880 202 202 double distanceFirst = firstPosition.distance(refPoint); 203 203 double distanceSecond = secondPosition.distance(refPoint); 204 double difference = distanceFirst - distanceSecond; 205 206 if (difference > 0.0) return 1; 207 if (difference < 0.0) return -1; 208 return 0; 204 return Double.compare(distanceFirst, distanceSecond); 209 205 } 210 206 } -
trunk/src/org/openstreetmap/josm/data/osm/NodePositionComparator.java
r8393 r9880 20 20 return 0; 21 21 22 double dLat = n1.getCoor().lat() - n2.getCoor().lat(); 23 if (dLat > 0) 24 return 1; 25 if (dLat < 0) 26 return -1; 27 double dLon = n1.getCoor().lon() - n2.getCoor().lon(); 28 if (dLon == 0) 29 return 0; 30 return dLon > 0 ? 1 : -1; 22 int dLat = Double.compare(n1.getCoor().lat(), n2.getCoor().lat()); 23 return dLat != 0 ? dLat : Double.compare(n1.getCoor().lon(), n2.getCoor().lon()); 31 24 } 32 25 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r9850 r9880 1478 1478 1479 1479 Pair<Timezone, Offset> splitOutTimezone() { 1480 // In hours , rounded to two decimal places1481 double tz = (withoutDayOffset().getSeconds() * 100L / 3600.0) / 100.0;1480 // In hours 1481 double tz = withoutDayOffset().getSeconds() / 3600.0; 1482 1482 1483 1483 // Due to imprecise clocks we might get a "+3:28" timezone, which should obviously be 3:30 with -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
r9804 r9880 100 100 @Override 101 101 public int compare(TrackLength l0, TrackLength l1) { 102 if (l0.value < l1.value) 103 return -1; 104 else if (l0.value > l1.value) 105 return 1; 106 return 0; 102 return Double.compare(l0.value, l1.value); 107 103 } 108 104 }
Note:
See TracChangeset
for help on using the changeset viewer.