Changeset 4181 in josm
- Timestamp:
- 2011-06-28T18:50:13+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Bounds.java
r4178 r4181 223 223 } 224 224 225 private double toInterval (double value, double min, double max) {225 private double toIntervalLat(double value, double min, double max) { 226 226 if (value < min) 227 227 return min; … … 231 231 } 232 232 233 private double toIntervalLon(double value) { 234 if (value < -180 || value > 180) { 235 value = (value + 180) % 360; 236 if (value < 0) { 237 value += 360; 238 } 239 return value - 180; 240 } else 241 return value; 242 } 243 233 244 public void normalize() { 234 minLat = toInterval (minLat, -90, 90);235 maxLat = toInterval (maxLat, -90, 90);236 minLon = toInterval (minLon, -180, 180);237 maxLon = toInterval (maxLon, -180, 180);245 minLat = toIntervalLat(minLat, -90, 90); 246 maxLat = toIntervalLat(maxLat, -90, 90); 247 minLon = toIntervalLon(minLon); 248 maxLon = toIntervalLon(maxLon); 238 249 } 239 250
Note:
See TracChangeset
for help on using the changeset viewer.