Math

Description

Utility Math Functions

Functions

NameSignature and Synopsis
absDoubledouble absDouble (double a)
Returns the absolute value of a double value.
absIntint absInt (int a)
Returns the absolute value of an int value.
absLonglong absLong (long a)
Returns the absolute value of a long value.
acosdouble acos (double a)
Returns the arc cosine of an angle.
asindouble asin (double a)
Returns the arc sine of an angle.
atandouble atan (double a)
Returns the arc tangent of an angle.
atanRectangularToPolardouble atanRectangularToPolar (double y, double x)
Converts rectangular coordinates (x, y) to polar (r, theta).
ceildouble ceil (double a)
Returns the smallest double value that is greater than or equal to the argument and is equal to an integer.
cosdouble cos (double a)
Returns the trigonometric cosine of an angle.
expdouble exp (double a)
Returns Euler's number e raised to the power of a double value.
floordouble floor (double a)
Returns the largest double value that is less than or equal to the argument and is equal to an integer.
IEEEremainderdouble IEEEremainder (double f1, double f2)
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
logdouble log (double a)
Returns the natural logarithm (base e) of a double value.
maxDoubledouble maxDouble (double a, double b)
Returns the greater of two double values.
maxIntint maxInt (int a, int b)
Returns the greater of two int values.
maxLonglong maxLong (long a, long b)
Returns the greater of two long values.
minDoubledouble minDouble (double a, double b)
Returns the smaller of two double values.
minIntint minInt (int a, int b)
Returns the smaller of two int values.
minLonglong minLong (long a, long b)
Returns the smaller of two long values.
powdouble pow (double a, double b)
Returns the value of the first argument raised to the power of the second argument.
randomdouble random ()
Returns a random double value between 0.0 and 1.0.
rintdouble rint (double a)
Returns the double value that is closest in value to the argument and is equal to an integer.
roundlong round (double a)
Returns the closest long to the argument.
roundFractiondouble roundFraction (double d1, int precision)
Returns a number rounded to integer places right of the decimal point.
sindouble sin (double a)
Returns the trigonometric sine of an angle.
sqrtdouble sqrt (double a)
Returns the correctly rounded positive square root of a double value.
tandouble tan (double a)
Returns the trigonometric tangent of an angle.
toDegreesdouble toDegrees (double angrad)
Converts an angle measured in radians to an angle measured in degrees.
toRadiansdouble toRadians (double angdeg)
Converts an angle measured in degrees to an angle measured in radians.