Skip to content

Mathematical

Mathematical Operators

Operator Description
+ addition
- subtraction
* multiplication
/ division
% modulo
^ exponentiation
~ bitwise NOT
& bitwise AND
| bitwise OR
# bitwise XOR
>> bitwise shift left
<< bitwise shift right

Mathematical Functions

Name Parameters Return Description
PI Float Return the value of PI.
FLOOR Float Integer Returns the largest integer value that is smaller than or equal to a number.
ROUND Float, Integer? Float Returns a number rounded to a specified number of decimal places.
SQUARE Integer Integer Returns the square of an integer value.
ABS Number Number Returns the absolute value of an integer value.
SIN Float Float Returns the sine of a number.
ASIN Float Float Returns the arc sine of a number.
COS FLOAT FLOAT Returns the cosine of a number.
ACOS FLOAT FLOAT Returns the arc cosine of a number.
TAN FLOAT FLOAT Returns the tangent of a number.
ATAN FLOAT FLOAT Returns the arc tangent of a number.
ATN2 FLOAT, FLOAT FLOAT Returns the arc tangent of two values.
SIGN Number Integer Returns the sign of a number.
MOD Integer, Integer Integer Returns the remainder of a number divided by another number.
RAND Float? Float Returns a random number between 0 (inclusive) and 1 (exclusive).