/// <summary>
        /// Returns the distance between two coordinates
        /// </summary>
        /// <param name="to">Second point</param>
        /// <returns>Meters value</returns>
        public float DistanceTo(LonLat to)
        {
            var angle = Math.Sin(Lat.RadValue) * Math.Sin(to.Lat.RadValue) + Math.Cos(Lat.RadValue) *
                        Math.Cos(to.Lat.RadValue) * Math.Cos(Lon.RadValue - to.Lon.RadValue);

            angle = Math.Acos(angle);

            return(EarthRadius * (float)angle);
        }
 public static bool IsLonLatAllowed(LonLat lonLat)
 {
     return(Projection.LonLatLimits.Contains(new Vector2(lonLat.Lon.RadValue, lonLat.Lat.RadValue)));
 }
 public static Vector2 LonLatToWorld(LonLat lonLat)
 {
     return(Projection.LatLonToWorld(new Vector2(lonLat.Lat.RadValue, lonLat.Lon.RadValue)) * WorldSize);
 }