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