[21:21] static
(extern: com.aussom.stdlib.AMath) extends: object
The static math class provides all sorts of mathematical functions.
e ()
Returns e, the base of natural logarithms.
A
double with the e value.pi ()
Gets the value of pi.
A
double with the value of pi.abs (Val
)
Gets the absolute value of the provided value. Acceptable types are bool, int, and double.
Val
is a value to take the absolute value of.An
int with the absolute value.acos (double AdjOverHypot
)
Arc cosine value for the provided value.
AdjOverHypot
is a double with the values.A
double with the angle value.asin (double OppOverHypot
)
Arc sine value for the provided value.
OppOverHypot
is a double with the values.A
double with the angle value.atan (double OppOverAdj
)
Arc tan value for the provided value.
OppOverAdj
is a double with the values.A
double with the angle value.cbrt (double Val
)
Cubed root function.
Val
is a double with the value to take the cubed root of.A
double with the result.ceil (double Val
)
Ceiling function returns the smallest double value greater than or equal to the provided value that is a mathematical integer.
copySign (double Magnitude, double Sign
)
Returns the first double argument with the sign of the second double argument.
Magnitude
is a double with the value.Sign
is a double with the sign.A
double with the value.cos (double AngleRad
)
The cosine function.
AngleRad
is a double with the angle.The
cosine of the argument.cosh (double AngleRad
)
The hyperbolic cosine of a double value.
AngleRad
is a double with the angle in radians.A
double with hyperbolic cosine of the angle.exp (double Val
)
Returns Euler's number e raised to the power of a double value.
Val
a double is the exponent to be raised to.A
double with the result.expm1 (double Val
)
Returns (e^x)-1.
Val
is a double with the value of x.A
double with the result.floor (double Val
)
Returns the largest double value that is less than or equal to the provided value that is an integer.
Val
is a double with the value to check.A
double with the floor value.getExponent (double Val
)
Returns the unbiased exponent used in the representation of a double.
Val
is a double to get the exponent of.A
double with the result.hypot (double X, double Y
)
Returns sqrt(x^2 + y^2) without intermediate overflow or underflow.
X
is a double with the x value.Y
is a double with the y value.A
double with the result.IEEEremainder (double Double1, double Double2
)
Computes the remainder operation on two arguments by the IEEE 754 standard.
Double1
is a double with the dividend.Double2
is a double with the divisor.A
double with the remainder.log (double Val
)
Returns the natural logarithm (base e) of the provided double value.
Val
is a double to take the natural log of.A
double with the result.log10 (double Val
)
Returns the log base 10 of the provided value.
Val
is a double with the value to take the log value.A
double with the result.log1p (double Val
)
Returns the natural logarithm of the sum of the argument and 1.
Val
is a double with the argument.A
double with the result.max (Val1, Val2
)
Returns the greater of the two provided values.
Val1
is a double with a value to compare.Val2
is a double with a value to compare.A
double with the greater of the two.min (Val1, Val2
)
Returns the smaller of the two provided values.
Val1
is a double with a value to compare.Val2
is a double with a value to compare.A
double with the smaller of the two.nextAfter (double Double1, double Double2
)
Returns the double number adjacent to the first number in the direction of the second double argument.
Double1
is a double with the first value.Double2
is a double with the second value.A
double with the result.nextUp (double Val
)
Returns the double value adjacent to the value in the direction of positive infinity.
Val
is a double with the value to get.A
double with the adjacent value.pow (double Double1, double Double2
)
Returns the value of the first argument to the power of the second argument.
Double1
is a double with the base number.Double2
is a double with the exponent.A
double with the value.rand ()
Returns a random double between 0 and 1.0.
A
double with the random value.rint (double Val
)
Returns the double value that is closest in value to the provided value and is equal to an integer.
Val
is a value to check.A
doubel with the return value.round (double Val
)
Rounds to the closest long.
Val
is a double with the value to round.A
double with the result.scalb (double DoubleVal, int IntVal
)
Returns d × 2^scaleFactor rounded as if performed by a single correctly rounded floating-point multiply to a member of the double value set.
DoubleVal
is a double with the d value.IntVal
is an int with the power.An
double with the value.signum (double Val
)
Returns the signum function of the argument. Returns 0 if the argument is 0, 1.0 if the argument is greater than 0, and -1.0 if the argument is less than 0.
Val
is a double with the argument.A
double with the result.sin (double Val
)
Gets the trig sine function.
Val
is the value of the function.A
double with the result.sinh (double Val
)
Returns the hyperbolic sine of the value.
Val
is the value of the function.A
double with the result.sqrt (double Val
)
Returns the square root of the value.
Val
is the value of the function.A
double with the result.tan (double Val
)
Gets the trig tangent function.
Val
is the value of the function.A
double with the result.tanh (double Val
)
Returns the hyperbolic tangent of the value.
Val
is the value of the function.A
double with the result.toDeg (double Val
)
Converts radians to degrees.
Val
is a double with the radians.A
double with the degrees.toRad (double Val
)
Converts degrees to radians.
Val
is a double with the degrees.A
double with the radians.ulp (double Val
)
Returns the size of an ulp of the argument.
Val
is the argument.A
double with the result.