Script unit that provides mathematical functions and constants.
Methods |
---|
function sin(value: decimal): decimal Returns the trigonometric sine of an angle. |
function cos(value: decimal): decimal Returns the trigonometric cosine of an angle. |
function tan(value: decimal): decimal Returns the trigonometric tangent of an angle. |
function asin(value: decimal): decimal Returns the arc sine of a value. |
function acos(value: decimal): decimal Returns the arc cosine of a value. |
function atan(value: decimal): decimal Returns the arc tangent of a value. |
function toDegrees(value: decimal): decimal Converts an angle measured in degrees to an approximately equivalent angle measured in radians. |
function toRadians(value: decimal): decimal Converts an angle measured in radians to an approximately equivalent angle measured in degrees. |
function exp(value: decimal): decimal Returns Euler's number e raised to the power of a |
function log(value: decimal): decimal Returns the natural logarithm (base e) of the input value. |
function scaleByPowerOfTen(value: decimal, power: decimal): decimal Returns the |
function sqrt(value: decimal): decimal Returns the positive square root of a value. |
function cbrt(value: decimal): decimal Returns the cube root of a |
function abs(value: decimal): decimal Returns the absolute value of a |
function round(value: decimal): decimal Returns the integer round value of the input value. |
function roundHalfEven(value: decimal): decimal Returns the integer round half even value of the input value. |
function roundHalfDown(value: decimal): decimal Returns the integer round half down value of the input value. |
function roundUp(value: decimal): decimal Returns the integer round up value of the input value. |
function roundDown(value: decimal): decimal Returns the integer round down value of the input value. |
function floor(value: decimal): decimal Returns the integer floor value of the input value. |
function ceil(value: decimal): decimal Returns the integer ceil value of the input value. |
Returns |
Returns |
Returns the trigonometric sine of an angle.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Special cases:
If the input value is zero, then the result is a zero.
Parameters :
value: the input value in radians.
Return :
the sine of the input value or null if the input value is null.
Returns the trigonometric cosine of an angle.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value in radians.
Return :
the cosine of the input value or null if the input value is null.
Returns the trigonometric tangent of an angle.
Special cases:
If the input value is zero, then the result is a zero.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value in radians.
Return :
the tangent of the input value or null if the input value is null.
Returns the arc sine of a value.
The returned angle is in the range -pi/2 through pi/2.
Special cases:
If the input value is zero, then the result is a zero.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value. Absolute value must not be greater than 1.
Return :
the arc sine of the input value or null if the input value is null.
Returns the arc cosine of a value.
The returned angle is in the range 0.0 through pi.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value. Absolute value must not be greater than 1.
Return :
the arc cosine of the input value or null if the input value is null.
Returns the arc tangent of a value.
The returned angle is in the range -pi/2 through pi/2.
Special cases:
If the input value is zero, then the result is a zero.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value.
Return :
the arc tangent of the input value or null if the input value is null.
Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
The conversion from degrees to radians is generally inexact.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value in radians
Return :
the measurement of the input value in degrees or null if the input value is null.
Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
The conversion from radians to degrees is generally inexact;
users should not expect cos(toRadians(90.0))
to exactly equal 0.0
.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value in degrees
Return :
the measurement of the input value in radians or null if the input value is null.
Returns Euler's number e raised to the power of a decimal
value.
Calculations are executed after conversion in double and use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value.
Return :
the value e^value where e is the base of the natural logarithms.
If the input value is null returns null.
Returns the natural logarithm (base e) of the input value.
Calculations use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value. Must be strictly greater than zero.
Return :
the natural logarithm of the input value a or null if input value is null.
Returns the value
scale by power
of ten.
Parameters :
value: the input value.
power: the power of ten that the value will be scale to to. Must be an integer.
Return :
the input value scaled by the power
of ten or null if input value or power is null.
Returns the positive square root of a value.
Calculations use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value. Must be positive or null.
Return :
the positive square root of the input value or null if input value is null.
Returns the cube root of a decimal
value. Calculations use double-precision 64-bit IEEE 754 floating point.
Parameters :
value: the input value.
Return :
the cube root of the input value or null if input value is null.
Returns the absolute value of a decimal
value.
Parameters :
value: the input value.
Return :
the absolute value of the input value or null if input value is null.
Returns the integer round value of the input value. This method uses the standard round half up rounding mode.
Parameters :
value: the input value.
Return :
the round half up value of the input value or null if input value is null.
Returns the integer round half even value of the input value.
Parameters :
value: the input value.
Return :
the round half even value of the input value or null if input value is null.
Returns the integer round half down value of the input value.
Parameters :
value: the input value.
Return :
the round half down value of the input value or null if input value is null.
Returns the integer round up value of the input value.
Parameters :
value: the input value.
Return :
the round up value of the input value or null if input value is null.
Returns the integer round down value of the input value.
Parameters :
value: the input value.
Return :
the round down value of the input value or null if input value is null.
Returns the integer floor value of the input value.
Parameters :
value: the input value.
Return :
the floor value of the input value or null if input value is null.
Returns the integer ceil value of the input value.
Parameters :
value: the input value.
Return :
the ceil value of the input value or null if input value is null..
Returns pi
value: 3.141592653589793238462643383279503
Return :
pi value.
Returns e
value: 2.718281828459045235360287471352662
Return :
e value.