public class SloppyMath extends Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns the arc sine of a value.
Returns the trigonometric cosine of an angle.
Returns the distance between two points in decimal degrees.
public static double haversin(double lat1, double lon1, double lat2, double lon2)
lat1- Latitude of the first point.
lon1- Longitude of the first point.
lat2- Latitude of the second point.
lon2- Longitude of the second point.
public static double cos(double a)
Error is around 1E-15.
NaNor an infinity, then the result is
a- an angle, in radians.
public static double asin(double a)
The returned angle is in the range -pi/2 through pi/2. Error is around 1E-7.
NaNor its absolute value is greater than 1, then the result is
a- the value whose arc sine is to be returned.
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.