public enum GPSDistanceFunction extends java.lang.Enum<GPSDistanceFunction> implements DistanceFunction
DistanceFunction
between two geographical points
using the Haversine formula.Enum Constant and Description |
---|
HAVERSINE |
Modifier and Type | Method and Description |
---|---|
static javafx.geometry.Point2D |
getMiddlePoint(double lat1,
double lng1,
double lat2,
double lng2)
Gets the middle point between two geographical points.
|
static GPSDistanceFunction |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static GPSDistanceFunction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getDistance
public static final GPSDistanceFunction HAVERSINE
public static GPSDistanceFunction[] values()
for (GPSDistanceFunction c : GPSDistanceFunction.values()) System.out.println(c);
public static GPSDistanceFunction valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static javafx.geometry.Point2D getMiddlePoint(double lat1, double lng1, double lat2, double lng2)
lat1
- lng1
- lat2
- lng2
-