Ignore:
Timestamp:
2022-06-14T20:11:21+02:00 (3 years ago)
Author:
taylor.smock
Message:

see #22104: Remove usages of Node#getCoor where possible

This also accounts for cases where Node has the methods used later,
so a new LatLon is unnecessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java

    r35975 r35976  
    758758     */
    759759    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();
    764764
    765765        return (ndx * pdx + ndy * pdy)
     
    780780    private Node interpolateNode(Node a, Node b, double f) {
    781781        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))
    784783            return a;
    785         if (latLon.equalsEpsilon(b.getCoor(), ILatLon.MAX_SERVER_PRECISION))
     784        if (n.equalsEpsilon(b, ILatLon.MAX_SERVER_PRECISION))
    786785            return b;
    787786        return n;
Note: See TracChangeset for help on using the changeset viewer.