LonelySharp.GeoLocation.CheckBounds C# (CSharp) Méthode

CheckBounds() private méthode

private CheckBounds ( ) : void
Résultat void
        private void CheckBounds()
        {
            if (radLat < MIN_LAT || radLat > MAX_LAT ||
                    radLon < MIN_LON || radLon > MAX_LON)
                throw new Exception("Arguments are out of bounds");
        }

Usage Example

Exemple #1
0
 /// <summary>
 /// Return GeoLocation from Radians
 /// </summary>
 /// <param name="latitude">The latitude, in radians.</param>
 /// <param name="longitude">The longitude, in radians.</param>
 /// <returns>GeoLocation in Radians</returns>
 public static GeoLocation FromRadians(double latitude, double longitude)
 {
     GeoLocation result = new GeoLocation
     {
         radLat = latitude,
         radLon = longitude,
         degLat = Helpers.ConvertRadiansToDegrees(latitude),
         degLon = Helpers.ConvertRadiansToDegrees(longitude)
     };
     result.CheckBounds();
     return result;
 }
All Usage Examples Of LonelySharp.GeoLocation::CheckBounds