Changeset 8549 in josm for trunk/test/unit
- Timestamp:
- 2015-07-01T19:51:35+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/GeometryTest.java
r7791 r8549 3 3 4 4 import org.junit.Assert; 5 import org.junit.BeforeClass; 5 6 import org.junit.Test; 6 import org.junit.BeforeClass;7 8 7 import org.openstreetmap.josm.JOSMFixture; 9 8 import org.openstreetmap.josm.data.coor.EastNorth; … … 30 29 31 30 EastNorth intersectionPoint = Geometry.getLineLineIntersection(p1, p2, p3, p4); 32 33 EastNorth d1 = intersectionPoint.sub(p3);34 EastNorth d2 = p 2.sub(p1);31 32 EastNorth d1 = p3.subtract(intersectionPoint); 33 EastNorth d2 = p1.subtract(p2); 35 34 Double crossProduct = d1.east()*d2.north() - d1.north()*d2.east(); 36 35 Double scalarProduct = d1.east()*d2.east() + d1.north()*d2.north(); 37 36 Double len1 = d1.length(); 38 37 Double len2 = d2.length(); 39 38 40 39 Double angle1 = Geometry.getCornerAngle(p1, p2, intersectionPoint); 41 40 Double angle2 = Geometry.getCornerAngle(p3, p4, intersectionPoint);
Note:
See TracChangeset
for help on using the changeset viewer.