readability

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

View File

@ -136,6 +136,8 @@ public class Pathfinder
if (priority == 0)
return double.MaxValue;
double distance = Utils.DistanceBetween(neighborNode, goalNode);
double speed = regionManager.GetSpeedForEdge(currentNode, edge.wayId, _speedType);
double angle = 0;
@ -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)