Package healpix.essentials
Class FastMath
java.lang.Object
healpix.essentials.FastMath
FastMath class is a Java implementation of the
 SLEEF
 library. Some of the methods can be used as substitutions of the
 corresponding methods in Math class. They have slightly less
 accuracy, and some methods are faster compared to those methods in
 Math class. Please note that the methods in the standard Math class
 are JNI methods, and the SLEEF library is specialized for SIMD
 operations.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic doubleacos(double d) This method calculates the arc cosine of x in radians.static doubleasin(double d) This method calculates the arc sine of x in radians.static final doubleatan(double s) Returns the arc tangent of an angle.static final doubleatan2(double y, double x) This method calculates the arc tangent of y/x in radians, using the signs of the two arguments to determine the quadrant of the result.static final doublecos(double d) Returns the trigonometric cosine of an angle.static final doublesin(double d) Returns the trigonometric sine of an angle.
- 
Constructor Details- 
FastMathpublic FastMath()
 
- 
- 
Method Details- 
atan2public static final double atan2(double y, double x) This method calculates the arc tangent of y/x in radians, using the signs of the two arguments to determine the quadrant of the result. The results may have maximum error of 2 ulps.
- 
asinpublic static double asin(double d) This method calculates the arc sine of x in radians. The return value is in the range [-pi/2, pi/2]. The results may have maximum error of 3 ulps.
- 
acospublic static double acos(double d) This method calculates the arc cosine of x in radians. The return value is in the range [0, pi]. The results may have maximum error of 3 ulps.
- 
atanpublic static final double atan(double s) Returns the arc tangent of an angle. The results may have maximum error of 2 ulps.
- 
sinpublic static final double sin(double d) Returns the trigonometric sine of an angle. The results may have maximum error of 2 ulps.
- 
cospublic static final double cos(double d) Returns the trigonometric cosine of an angle. The results may have maximum error of 2 ulps.
 
-