Changeset 8384 in josm for trunk/src/org/openstreetmap/josm/data/coor
- Timestamp:
- 2015-05-17T15:52:24+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java
r8345 r8384 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.coor; 3 4 import org.openstreetmap.josm.tools.Utils; 3 5 4 6 public final class QuadTiling { … … 68 70 static long lon2x(double lon) { 69 71 long ret = (long)((lon + 180.0) * WORLD_PARTS / 360.0); 70 if ( ret == WORLD_PARTS) {72 if (Utils.equalsEpsilon(ret, WORLD_PARTS)) { 71 73 ret--; 72 74 } … … 76 78 static long lat2y(double lat) { 77 79 long ret = (long)((lat + 90.0) * WORLD_PARTS / 180.0); 78 if ( ret == WORLD_PARTS) {80 if (Utils.equalsEpsilon(ret, WORLD_PARTS)) { 79 81 ret--; 80 82 }
Note:
See TracChangeset
for help on using the changeset viewer.