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:
parent
23fbd17d6a
commit
49c6d36945
1 changed files with 1 additions and 5 deletions
|
|
@ -58,11 +58,7 @@ public class EuclideanCosts extends AbstractForwardVehicleRoutingTransportCosts
|
||||||
}
|
}
|
||||||
|
|
||||||
private double calculateDistance(Location fromLocation, Location toLocation) {
|
private double calculateDistance(Location fromLocation, Location toLocation) {
|
||||||
Coordinate from = null;
|
return calculateDistance(fromLocation.getCoordinate(), toLocation.getCoordinate());
|
||||||
Coordinate to = null;
|
|
||||||
from = fromLocation.getCoordinate();
|
|
||||||
to = toLocation.getCoordinate();
|
|
||||||
return calculateDistance(from, to);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private double calculateDistance(Coordinate from, Coordinate to) {
|
private double calculateDistance(Coordinate from, Coordinate to) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue