changed speeds and return type to byte
This commit is contained in:
@ -25,10 +25,8 @@ public static partial class Pathfinder
|
||||
if (node2 is null)
|
||||
return double.MaxValue;
|
||||
double distance = Utils.DistanceBetween(node1, node2);
|
||||
double speed = regionManager.GetSpeedForEdge(node1, edge.wayId, vehicle);
|
||||
if (speed is 0)
|
||||
return double.MaxValue;
|
||||
return distance / speed;
|
||||
byte speed = regionManager.GetSpeedForEdge(node1, edge.wayId, vehicle);
|
||||
return speed is 0 ? double.MaxValue : distance / speed;
|
||||
}
|
||||
|
||||
private static List<PathNode> GetRouteFromCalc(OsmNode goalNode, RegionManager regionManager)
|
||||
|
Reference in New Issue
Block a user