/// <summary> /// Ensure Latitude stays in range /// </summary> /// <param name="longitude">The longitude value</param> /// <returns>The normalized longitude</returns> public static Angle NormalizeLongitude(Angle longitude) { return(Math.Min(MaxLongitude.Degrees, Math.Max(longitude.Degrees, MinLongitude.Degrees))); }
/// <summary> /// Get the globally unique Mesh number of a location given by /// latitude and longitude. /// </summary> /// <param name="latitude">The latitude (in degrees)</param> /// <param name="longitude">The longitude (in degrees)</param> /// <returns>The mesh number to which the location belongs</returns> public long MeshNumber(Angle latitude, Angle longitude) { return MeshNumber(new GlobalCoordinates(latitude, longitude)); }
/// <summary> /// Ensure Latitude stays in range /// </summary> /// <param name="latitude">The longitude value</param> /// <returns>The normalized longitude</returns> public Angle NormalizeLatitude(Angle latitude) { return(Math.Min(MaxLatitude.Degrees, Math.Max(latitude.Degrees, MinLatitude.Degrees))); }