public class GeoLocation extends Object
Modifier and Type | Field and Description |
---|---|
static double |
EARTH_RADIUS_KM |
double |
latitude
The latitude
|
double |
longitude
The longitude
|
Constructor and Description |
---|
GeoLocation(double lat,
double lng) |
Modifier and Type | Method and Description |
---|---|
double |
haversine(GeoLocation actual)
Compute the haversine distance between two points on the Earth's surface
in kilometers.
|
String |
toString() |
public static final double EARTH_RADIUS_KM
public double latitude
public double longitude
public GeoLocation(double lat, double lng)