public final class FastMath
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
SAFE_MIN |
Constructor and Description |
---|
FastMath() |
Modifier and Type | Method and Description |
---|---|
static double |
acos(double x)
Compute the arc cosine of a number.
|
static double |
asin(double x)
Compute the arc sine of a number.
|
static double |
atan(double x)
Arctangent function
|
static double |
copySign(double magnitude,
double sign)
Returns the first argument with the sign of the second argument.
|
static double |
cosQ(double xa)
Compute cosine in the first quadrant by subtracting input from PI/2 and
then calling sinQ.
|
static double |
sinQ(double xa,
double xb)
Compute sine over the first quadrant (0 < x < pi/2).
|
static double |
sqrt(double a)
Compute the square root of a number.
|
public static final double SAFE_MIN
public static double sinQ(double xa, double xb)
xa
- number from which sine is requestedxb
- second parampublic static double cosQ(double xa)
xa
- number from which cosine is requestedpublic static double asin(double x)
x
- number on which evaluation is donepublic static double atan(double x)
x
- a numberpublic static double acos(double x)
x
- number on which evaluation is donepublic static double sqrt(double a)
Note: this implementation currently delegates to Math.sqrt(double)
a
- number on which evaluation is donepublic static double copySign(double magnitude, double sign)
sign
argument is treated as positive.magnitude
- the value to returnsign
- the sign for the returned valuesign
argumentCopyright © 2018 F.-X. Pineau, CDS, Observatoire Astronomique de Strasbourg, Universite de Strasbourg, CNRS. All Rights Reserved.