Math

Example

1

Description

Properties

Property Name Description
E Euler's number, approximately 2.718
LN10 natural logarithm of 10, approximately 2.302
LN2 natural logarithm of 2, approximately 0.693
LOG10E base-10 logarithm of E, approximately 0.434
LOG2E base-2 logarithm of E, approximately 1.442
PI value of pi, approximately 3.14159
SQRT1_2 square root of one half, approximately 0.707
SQRT2 square root of 2, approximately 1.414

Methods

Method Name Description Values
acos() Returns the arccosine of the given number.
asin() Returns the arcsine of the given number.
atan() Returns the arctangent of the given number.
atan2() Returns the arctangent of the quotient of its arguments.
ceil() Returns the given number rounded upward to the nearest integer.
cos() Returns the cosine of the given number.
exp() Returns E to the power of the given number, where E is Euler's number (approximately 2.7183).
floor() Returns the given number rounded downward to the nearest integer.
log() Returns the natural (base E) logarithm of the given number.
max() Returns the highest value of all given numbers.
min() Returns the lowest value of all given numbers.
pow() Returns the value of base to the power of exponent.
random() Returns a random number between 0 and 1.
round() Returns the given number rounded up or down to the closest integer.
sin() Returns the sine of the given number.
sqrt() Returns the square root of the given number.
tan() Returns the tangent of the given number.