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.

Location:
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java

    r35579 r35976  
    209209                        } else {
    210210                            length += lastNode.getCoor().greatCircleDistance(n.getCoor());
    211                             segAngle = MeasurementLayer.angleBetween(lastNode.getCoor(), n.getCoor());
     211                            segAngle = MeasurementLayer.angleBetween(lastNode, n);
    212212                            lastNode = n;
    213213                        }
     
    235235                        wayArea += (MeasurementLayer.calcX(n.getCoor()) * MeasurementLayer.calcY(lastN.getCoor()))
    236236                                - (MeasurementLayer.calcY(n.getCoor()) * MeasurementLayer.calcX(lastN.getCoor()));
    237                         segAngle = MeasurementLayer.angleBetween(lastN.getCoor(), n.getCoor());
     237                        segAngle = MeasurementLayer.angleBetween(lastN, n);
    238238                    }
    239239                    lastN = n;
  • applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java

    r35369 r35976  
    22package org.openstreetmap.josm.plugins.measurement;
    33/// @author Raphael Mack <ramack@raphael-mack.de>
     4
    45import static org.openstreetmap.josm.tools.I18n.tr;
    56
     
    2829
    2930import org.openstreetmap.josm.data.Bounds;
     31import org.openstreetmap.josm.data.coor.ILatLon;
    3032import org.openstreetmap.josm.data.coor.LatLon;
    3133import org.openstreetmap.josm.data.gpx.IGpxTrack;
     
    171173    }
    172174
    173     public static double angleBetween(LatLon p1, LatLon p2){
     175    public static double angleBetween(ILatLon p1, ILatLon p2){
    174176        double lat1, lon1, lat2, lon2;
    175177        double dlon;
Note: See TracChangeset for help on using the changeset viewer.