Skip to content

Commit 40244ce

Browse files
committed
Decimal separator bugfix in CoordTest.
Made a small bugfix in the CoordTest class. In particular, the isClose() method should have been called with a limit value of 0.0002 instead of a value of 000020 (forgot to add the decimal separator). Some other cleanups were also done by removing unnecessary zeros at the end of some decimal numbers.
1 parent 97da99e commit 40244ce

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/gov/nasa/worldwind/geom/coords/CoordTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ private static boolean isClose(LatLon a, LatLon b, double limit)
2929
&& isClose(a.longitude.radians, b.longitude.radians, limit);
3030
}
3131

32-
private static final LatLon[] TEST_POSITIONS =
32+
private static final LatLon[] TEST_POSITIONS =
3333
{
3434
LatLon.fromDegrees(-74.37916, 155.02235),
3535
LatLon.fromDegrees(0, 0),
36-
LatLon.fromDegrees(0.1300, -0.2324),
36+
LatLon.fromDegrees(0.13, -0.2324),
3737
LatLon.fromDegrees(-45.6456, 23.3545),
3838
LatLon.fromDegrees(-12.7650, -33.8765),
3939
LatLon.fromDegrees(23.4578, -135.4545),
@@ -60,7 +60,7 @@ public void mgrsConstructionTest()
6060
MGRSCoord fromLatLon = MGRSCoord.fromLatLon(input.latitude, input.longitude);
6161
MGRSCoord fromString = MGRSCoord.fromString(fromLatLon.toString(), null);
6262
LatLon position = LatLon.fromRadians(fromString.getLatitude().radians, fromString.getLongitude().radians);
63-
assertTrue(isClose(input, position, 000020));
63+
assertTrue(isClose(input, position, 0.0002));
6464
}
6565
}
6666

@@ -78,15 +78,15 @@ public void mgrsOnlyConstructionTest()
7878
MGRSCoord fromLatLon = MGRSCoord.fromLatLon(input.latitude, input.longitude);
7979
MGRSCoord fromString = MGRSCoord.fromString(fromLatLon.toString(), null);
8080
LatLon position = LatLon.fromRadians(fromString.getLatitude().radians, fromString.getLongitude().radians);
81-
assertTrue(isClose(input, position, 000020));
81+
assertTrue(isClose(input, position, 0.0002));
8282
}
8383
}
8484

8585
private static final LatLon[] NO_INVERSE_POSITIONS =
8686
{
87-
LatLon.fromDegrees(90.0000, 177.0000),
88-
LatLon.fromDegrees(-90.0000, -177.0000),
89-
LatLon.fromDegrees(90.0000, 3.0000)
87+
LatLon.fromDegrees(90.0, 177.0),
88+
LatLon.fromDegrees(-90.0, -177.0),
89+
LatLon.fromDegrees(90.0, 3.0)
9090
};
9191

9292
private static final String[] NO_INVERSE_TO_MGRS =

0 commit comments

Comments
 (0)