Package org.geonames.utils
Class Bearing
- java.lang.Object
-
- org.geonames.utils.Bearing
-
public class Bearing extends Object
compass bearing from the first point to the second point in degrees.- Author:
- Marc Wick
-
-
Constructor Summary
Constructors Constructor Description Bearing()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
calculateBearing(double lat1, double lng1, double lat2, double lng2)
Returns the direction from the first point to the second point in degrees.
-
-
-
Method Detail
-
calculateBearing
public static double calculateBearing(double lat1, double lng1, double lat2, double lng2)
Returns the direction from the first point to the second point in degrees. The direction is the clockwise angle between the magnetic north and the direction from point1 to point2- Parameters:
lat1
-lng1
-lat2
-lng2
-- Returns:
-
-