readability
This commit is contained in:
parent
9301e948b0
commit
2799db162d
@ -135,6 +135,8 @@ public class Pathfinder
|
||||
double priority = regionManager.GetPriorityForVehicle(_speedType, edge, currentNode);
|
||||
if (priority == 0)
|
||||
return double.MaxValue;
|
||||
|
||||
double distance = Utils.DistanceBetween(neighborNode, goalNode);
|
||||
|
||||
double speed = regionManager.GetSpeedForEdge(currentNode, edge.wayId, _speedType);
|
||||
|
||||
@ -152,7 +154,7 @@ public class Pathfinder
|
||||
}
|
||||
|
||||
double roadPriority = priority * roadPriorityFactor;
|
||||
return Utils.DistanceBetween(neighborNode, goalNode) / (speed * angle + roadPriority + 1);
|
||||
return distance / (speed * angle + roadPriority + 1);
|
||||
}
|
||||
|
||||
public void SaveResult(string path)
|
||||
|
Loading…
Reference in New Issue
Block a user