Changeset 6881 in josm for trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java
- Timestamp:
- 2014-02-24T17:49:12+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java
r6334 r6881 12 12 public class ProjectionTest { 13 13 14 private static final boolean debug = false;15 14 private static Random rand = new Random(System.currentTimeMillis()); 16 15 … … 64 63 double maxErrLat = 0, maxErrLon = 0; 65 64 Bounds b = p.getWorldBoundsLatLon(); 66 65 67 66 text += String.format("*** %s %s%n", p.toString(), p.toCode()); 68 67 for (int num=0; num < 1000; ++num) { 69 68 70 69 double lat = rand.nextDouble() * (b.getMax().lat() - b.getMin().lat()) + b.getMin().lat(); 71 70 double lon = rand.nextDouble() * (b.getMax().lon() - b.getMin().lon()) + b.getMin().lon(); 72 71 73 72 LatLon ll = new LatLon(lat, lon); 74 73 75 74 for (int i=0; i<10; ++i) { 76 75 EastNorth en = p.latlon2eastNorth(ll); … … 80 79 maxErrLon = Math.max(maxErrLon, Math.abs(lon - ll.lon())); 81 80 } 82 81 83 82 String mark = ""; 84 83 if (maxErrLat + maxErrLon > 1e-5) {
Note:
See TracChangeset
for help on using the changeset viewer.
