Changeset 9806 in josm for trunk/test/unit
- Timestamp:
- 2016-02-15T18:41:57+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java
r8857 r9806 10 10 */ 11 11 public class LatLonTest { 12 13 private static final double EPSILON = 1e-6; 12 14 13 15 public static final double[] SAMPLE_VALUES = new double[]{ … … 124 126 } 125 127 } 128 129 /** 130 * Test of {@link LatLon#bearing} 131 */ 132 @Test 133 public void testBearing() { 134 LatLon c = new LatLon(47.000000, 19.000000); 135 LatLon e = new LatLon(47.000000, 19.000001); 136 LatLon n = new LatLon(47.000001, 19.000000); 137 assertEquals( 0, Math.toDegrees(c.bearing(n)), EPSILON); 138 assertEquals( 90, Math.toDegrees(c.bearing(e)), EPSILON); 139 assertEquals(180, Math.toDegrees(n.bearing(c)), EPSILON); 140 assertEquals(270, Math.toDegrees(e.bearing(c)), EPSILON); 141 } 126 142 }
Note:
See TracChangeset
for help on using the changeset viewer.