1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

EuclideanCosts.calculateDistance(Location,Location) is a one-liner now

This commit is contained in:
Michal Maciejewski 2017-10-24 14:31:36 +02:00
parent 23fbd17d6a
commit 49c6d36945

View file

@ -58,11 +58,7 @@ public class EuclideanCosts extends AbstractForwardVehicleRoutingTransportCosts
}
private double calculateDistance(Location fromLocation, Location toLocation) {
Coordinate from = null;
Coordinate to = null;
from = fromLocation.getCoordinate();
to = toLocation.getCoordinate();
return calculateDistance(from, to);
return calculateDistance(fromLocation.getCoordinate(), toLocation.getCoordinate());
}
private double calculateDistance(Coordinate from, Coordinate to) {