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
|
Method Summary |
static double |
calculateBearing(double lat1,
double lng1,
double lat2,
double lng2)
Returns the direction from the first point to the second point in
degrees. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Bearing
public Bearing()
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: