Changeset 13712 in josm for trunk/test
- Timestamp:
- 2018-05-07T23:40:50+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/GeometryTest.java
r13670 r13712 5 5 6 6 import java.io.FileInputStream; 7 import java.util.Arrays; 7 8 import java.util.List; 8 9 … … 145 146 assertEquals(162.66381817961337, angle, 1e-5); 146 147 } 148 149 /** 150 * Test of {@link Geometry#getCentroidEN} method. 151 */ 152 @Test 153 public void testCentroidEN() { 154 EastNorth en1 = new EastNorth(100, 200); 155 EastNorth en2 = new EastNorth(150, 400); 156 EastNorth en3 = new EastNorth(200, 200); 157 assertEquals(en1, Geometry.getCentroidEN(Arrays.asList(en1))); 158 assertEquals(new EastNorth(125, 300), Geometry.getCentroidEN(Arrays.asList(en1, en2))); 159 assertEquals(new EastNorth(150, 266d + 2d/3d), Geometry.getCentroidEN(Arrays.asList(en1, en2, en3))); 160 } 147 161 }
Note:
See TracChangeset
for help on using the changeset viewer.