readability

This commit is contained in:
glax 2023-04-23 15:09:22 +02:00
parent 9301e948b0
commit 2799db162d

View File

@ -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)