Changeset 35976 in osm for applications/editors/josm/plugins/terracer
- Timestamp:
- 2022-06-14T20:11:21+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java
r35975 r35976 758 758 */ 759 759 private double calculateSideness(Node a, Node b, Node c, Node d) { 760 final double ndx = b. getCoor().getX() - a.getCoor().getX();761 final double pdx = d. getCoor().getX() - c.getCoor().getX();762 final double ndy = b. getCoor().getY() - a.getCoor().getY();763 final double pdy = d. getCoor().getY() - c.getCoor().getY();760 final double ndx = b.lon() - a.lon(); 761 final double pdx = d.lon() - c.lon(); 762 final double ndy = b.lat() - a.lat(); 763 final double pdy = d.lat() - c.lat(); 764 764 765 765 return (ndx * pdx + ndy * pdy) … … 780 780 private Node interpolateNode(Node a, Node b, double f) { 781 781 Node n = new Node(a.getEastNorth().interpolate(b.getEastNorth(), f)); 782 LatLon latLon = n.getCoor(); 783 if (latLon.equalsEpsilon(a.getCoor(), ILatLon.MAX_SERVER_PRECISION)) 782 if (n.equalsEpsilon(a, ILatLon.MAX_SERVER_PRECISION)) 784 783 return a; 785 if ( latLon.equalsEpsilon(b.getCoor(), ILatLon.MAX_SERVER_PRECISION))784 if (n.equalsEpsilon(b, ILatLon.MAX_SERVER_PRECISION)) 786 785 return b; 787 786 return n;
Note:
See TracChangeset
for help on using the changeset viewer.