Functions -
math
IEEEremainder | Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. |
absFloat | Returns the absolute value of a float value. |
absInt | Returns the absolute value of an int value. |
acos | Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi. |
asin | Returns the arc sine of a value. |
atan | Returns the arc tangent of a value. |
atan2 | Returns the angle theta from the conversion of rectangular coordinates (a, b) to polar coordinates (r, theta). |
cbrt | Returns the cube root of a float value. |
ceil | Returns the smallest (closest to negative infinity) double value that is greater than orequal to the argument and is equal to a mathematical integer. |
copySign | Returns the first floating-point argument with the sign of the second floating-point argument. |
cos | Returns the trigonometric cosine of an angle. |
cosh | Returns the hyperbolic cosine of a float value. |
exp | Returns Euler's number, that is 'e' raised to the power of exponent. |
expm1 | Returns (e to the power of x) -1. |
floor | Returns the largest (closest to positive infinity) float value that is less than or equal to the argument and is equal to a mathematical integer. |
floorDiv | Returns the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient. |
floorMod | Returns the floor modulus of the long arguments. |
getExponent | Returns the unbiased exponent used in the representation of a float. |
hypot | Returns sqrt(a squared +b squared) without intermediate overflow or underflow. |
log | Returns the natural logarithm (base e) of a float value. |
log10 | Returns the base 10 logarithm of a float value. |
log1p | Returns the natural logarithm of the sum of the argument and 1. |
negateExact | Returns the negation of the argument. |
nextAfter | Returns the floating-point number adjacent to the first argument in the direction of the second argument. |
nextDown | Returns the adjacent floating-point value closer to negative infinity. |
nextUp | Returns the adjacent floating-point value closer to positive infinity. |
pow | Returns the value of the 'a' raised to the power of 'b'. |
random | Returns a random number between 0.0 and 1.0. |
randomInRange | Returns a random number between given start(inclusive) and end(exclusive) values. |
rint | Returns the double value that is closest in value to the argument and is equal to a mathematical integer. |
round | Returns the closest int to the argument, with ties rounding to positive infinity. |
scalb | Returns a × (2 to the power of b) rounded as if performed by a single correctly rounded floating-point multiply to a member of the float value set. |
signum | Returns the signum function of the argument. |
sin | Returns the trigonometric sine of an angle. |
sinh | Returns the hyperbolic sine of a float value. |
sqrt | Returns rounded positive square root of the given value. |
tan | Returns the trigonometric tangent of an angle. |
tanh | Returns the hyperbolic tangent of a double value. |
toDegrees | Converts an angle measured in radians to an approximately equivalent angle measured in degrees. |
toRadians | Converts an angle measured in degrees to an approximately equivalent angle measured in radians. |
ulp | Returns the size of an ulp of the argument. |
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
-
Return Type
(float) The remainder when a is divided by b
Returns the absolute value of a float value.
Parameters
- val float
-
Value to get absolute value
-
Return Type
(float) Absolute value
Returns the absolute value of an int value.
Parameters
- val int
-
Value to get the absolute value
-
Return Type
(int) Absolute value
Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi.
Parameters
- val float
-
Value to get the arc cosine
-
Return Type
(float) Arc cosine value
Returns the arc sine of a value.
Parameters
- val float
-
Value to get the arc sine
-
Return Type
(float) Arc sine value
Returns the arc tangent of a value.
Parameters
- val float
-
Value to get the arc tangent
-
Return Type
(float) Arc tangent value
Returns the angle theta from the conversion of rectangular coordinates (a, b) to polar coordinates (r, theta).
-
Return Type
(float) The result
Returns the cube root of a float value.
Parameters
- val float
-
Value to get the cube root
-
Return Type
(float) Cube root value
Returns the smallest (closest to negative infinity) double value that is greater than orequal to the argument and is equal to a mathematical integer.
Parameters
- val float
-
Value to get the ceil
-
Return Type
(float) The result
Returns the first floating-point argument with the sign of the second floating-point argument.
Parameters
- a float
-
The parameter providing the magnitude of the result
- b float
-
The parameter providing the sign of the result
-
Return Type
(float) The result
Returns the trigonometric cosine of an angle.
Parameters
- val float
-
Value to get the trigonometric cosine
-
Return Type
(float) The result
Returns the hyperbolic cosine of a float value.
Parameters
- val float
-
The number whose hyperbolic cosine is to be returned
-
Return Type
(float) The hyperbolic cosine of given float value
Returns Euler's number, that is 'e' raised to the power of exponent.
Parameters
- val float
-
Exponent value to raise
-
Return Type
(float) Exp value
Returns (e to the power of x) -1.
Parameters
- val float
-
The exponent to raise e to in the computation
-
Return Type
(float) The result
Returns the largest (closest to positive infinity) float value that is less than or equal to the argument and is equal to a mathematical integer.
Parameters
- val float
-
A float value
-
Return Type
(float) The result
Returns the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient.
-
Return Type
(int) The result
Returns the floor modulus of the long arguments.
-
Return Type
(int) The result
Returns the unbiased exponent used in the representation of a float.
Parameters
- val float
-
Float value
-
Return Type
(int) The unbiased exponent of the argument
Returns sqrt(a squared +b squared) without intermediate overflow or underflow.
-
Return Type
(float) The result
Returns the natural logarithm (base e) of a float value.
Parameters
- val float
-
A float value
-
Return Type
(float) The result
Returns the base 10 logarithm of a float value.
Parameters
- val float
-
A float value
-
Return Type
(float) The base 10 logarithm of a given float value
Returns the natural logarithm of the sum of the argument and 1.
Parameters
- val float
-
A float value
-
Return Type
(float) The natural log of x + 1
Returns the negation of the argument.
Parameters
- val int
-
The value to negate
-
Return Type
(int) The result
Returns the floating-point number adjacent to the first argument in the direction of the second argument.
Parameters
- a float
-
Starting floating-point value
- b float
-
Value indicating which of start's neighbors or start should be returned
-
Return Type
(float) The result
Returns the adjacent floating-point value closer to negative infinity.
Parameters
- val float
-
Starting floating-point value
-
Return Type
(float) The result
Returns the adjacent floating-point value closer to positive infinity.
Parameters
- val float
-
Starting floating-point value
-
Return Type
(float) The result
Returns the value of the 'a' raised to the power of 'b'.
-
Return Type
(float) Result value
Returns a random number between 0.0 and 1.0.
-
Return Type
(float) Random value
Returns a random number between given start(inclusive) and end(exclusive) values.
-
Return Type
(int) Random value
Returns the double value that is closest in value to the argument and is equal to a mathematical integer.
Parameters
- val float
-
A float value
-
Return Type
(float) The result
Returns the closest int to the argument, with ties rounding to positive infinity.
Parameters
- val float
-
A floating-point value to be rounded to an integer
-
Return Type
(int) The value of the argument rounded to the nearest int value
Returns a × (2 to the power of b) rounded as if performed by a single correctly rounded floating-point multiply to a member of the float value set.
-
Return Type
(float) The result
Returns the signum function of the argument.
Parameters
- val float
-
The floating-point value whose signum is to be returned
-
Return Type
(float) The signum function of the argument
Returns the trigonometric sine of an angle.
Parameters
- val float
-
An angle, in radians
-
Return Type
(float) The sine of the argument
Returns the hyperbolic sine of a float value.
Parameters
- val float
-
The number whose hyperbolic sine is to be returned
-
Return Type
(float) The hyperbolic sine of a given float
Returns rounded positive square root of the given value.
Parameters
- val float
-
Value to get square root
-
Return Type
(float) Square root value
Returns the trigonometric tangent of an angle.
Parameters
- val float
-
An angle, in radians
-
Return Type
(float) The tangent of the argument
Returns the hyperbolic tangent of a double value.
Parameters
- val float
-
The number whose hyperbolic tangent is to be returned
-
Return Type
(float) The hyperbolic tangent of x
Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
Parameters
- val float
-
An angle, in radians
-
Return Type
(float) The measurement of the angle angrad in degrees