Reworked MapPath and derived classes

This commit is contained in:
ClemensF 2020-05-13 18:17:28 +02:00
parent 414389513e
commit 49d508b3f5
9 changed files with 106 additions and 84 deletions

View file

@ -84,7 +84,7 @@ namespace MapControl
}
/// <summary>
/// Normalizes a longitude to a value in the interval [-180..180].
/// Normalizes a longitude to a value in the interval [-180 .. 180].
/// </summary>
public static double NormalizeLongitude(double longitude)
{
@ -99,21 +99,5 @@ namespace MapControl
return longitude;
}
internal static double NearestLongitude(double longitude, double referenceLongitude)
{
longitude = NormalizeLongitude(longitude);
if (longitude > referenceLongitude + 180d)
{
longitude -= 360d;
}
else if (longitude < referenceLongitude - 180d)
{
longitude += 360d;
}
return longitude;
}
}
}