Changeset 8549 in josm for trunk/test


Ignore:
Timestamp:
2015-07-01T19:51:35+02:00 (9 years ago)
Author:
bastiK
Message:

applied #11628 - Added documentation to EastNorth, changed x - y = y.sub(x) to x.subtract(y) and minor code style improvements. (patch by michael2402, partially applied)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/GeometryTest.java

    r7791 r8549  
    33
    44import org.junit.Assert;
     5import org.junit.BeforeClass;
    56import org.junit.Test;
    6 import org.junit.BeforeClass;
    7 
    87import org.openstreetmap.josm.JOSMFixture;
    98import org.openstreetmap.josm.data.coor.EastNorth;
     
    3029
    3130        EastNorth intersectionPoint = Geometry.getLineLineIntersection(p1, p2, p3, p4);
    32        
    33         EastNorth d1 = intersectionPoint.sub(p3);
    34         EastNorth d2 = p2.sub(p1);
     31
     32        EastNorth d1 = p3.subtract(intersectionPoint);
     33        EastNorth d2 = p1.subtract(p2);
    3534        Double crossProduct = d1.east()*d2.north() - d1.north()*d2.east();
    3635        Double scalarProduct = d1.east()*d2.east() + d1.north()*d2.north();
    3736        Double len1 = d1.length();
    3837        Double len2 = d2.length();
    39        
     38
    4039        Double angle1 = Geometry.getCornerAngle(p1, p2, intersectionPoint);
    4140        Double angle2 = Geometry.getCornerAngle(p3, p4, intersectionPoint);
Note: See TracChangeset for help on using the changeset viewer.