Package provided.owlMaps.general
Interface ILatLng
- All Superinterfaces:
java.io.Serializable
public interface ILatLng
extends java.io.Serializable
The latitude and longitude of a location on Earth.
- Author:
- swong
-
Method Summary
Modifier and Type Method Description static double
degreesToRadians(double degrees)
Convert the given value from degrees to radiansdouble
distanceBetween(ILatLng otherLatLng, double earthRadius)
The distance between this and a given ILatLng, assuming a spherical Earthdouble
getLat()
Accessor for the latitudedouble
getLng()
Accessor for the longitudestatic ILatLng
make(double lat, double lng)
Make a new ILatLng object
-
Method Details
-
getLat
double getLat()Accessor for the latitude- Returns:
- The latitude value
-
getLng
double getLng()Accessor for the longitude- Returns:
- The longitude value
-
distanceBetween
The distance between this and a given ILatLng, assuming a spherical Earth- Parameters:
otherLatLng
- The other ILatLng locationearthRadius
- The Earth's radius to use in any units- Returns:
- The distance between the two locations in the same units as the given Earth's radius.
-
degreesToRadians
static double degreesToRadians(double degrees)Convert the given value from degrees to radians- Parameters:
degrees
- A value in degrees- Returns:
- The equivalent value in radians.
-
make
Make a new ILatLng object- Parameters:
lat
- Latitude value in the range [-90, +90]lng
- Longitude value in the range [-180, +180]- Returns:
- An instance of ILatLng
-