Fixed gScore with MaxValue due to Vector Angle returning NaN
This commit is contained in:
@ -131,11 +131,9 @@ public static class Renderer
|
||||
}
|
||||
|
||||
[SuppressMessage("Interoperability", "CA1416:Plattformkompatibilität überprüfen")]
|
||||
public static ValueTuple<Image, Bounds> DrawGScores(Dictionary<OsmNode, double> gScoreDict, Image? renderOver = null,
|
||||
public static ValueTuple<Image, Bounds> DrawGScores(Dictionary<OsmNode, double> gScore, Image? renderOver = null,
|
||||
Bounds? bounds = null)
|
||||
{
|
||||
Dictionary<OsmNode, double> gScore =
|
||||
gScoreDict.Where(kv => kv.Value < double.MaxValue).ToDictionary(pair => pair.Key, pair => pair.Value);
|
||||
|
||||
float minLat = bounds?.minLat ?? gScore.Min(kv => kv.Key.coordinates.latitude);
|
||||
float minLon = bounds?.minLon ?? gScore.Min(kv => kv.Key.coordinates.longitude);
|
||||
|
Reference in New Issue
Block a user