Math

Math Syntax: %<math_operations>%

You can execute math inside the value of an element, for example you could set the element value to %{fps} * 10% which would return your fps, but times ten.

A list of all built in operators, functions and constants can be found below.

Built in operators

Operator
Description

+

Additive operator

Subtraction operator

*

Multiplication operator

/

Division operator

%

Remainder operator (Modulo)

^

Power operator

Built in functions

Function*
Description

NOT(expression)

Boolean negation, 1 (means true) if the expression is not zero

RANDOM()

Produces a random number between 0 and 1

MIN(e1,e2)

Returns the smaller of both expressions

MAX(e1,e2)

Returns the bigger of both expressions

ABS(expression)

Returns the absolute (non-negative) value of the expression

ROUND(expression,precision)

Rounds a value to a certain number of digits, uses the current rounding mode

LOG(expression)

Returns the natural logarithm (base e) of an expression

SQRT(expression)

Returns the square root of an expression

SIN(expression)

Returns the trigonometric sine of an angle (in degrees)

COS(expression)

Returns the trigonometric cosine of an angle (in degrees)

TAN(expression)

Returns the trigonometric tangens of an angle (in degrees)

SINH(expression)

Returns the hyperbolic sine of a value

COSH(expression)

Returns the hyperbolic cosine of a value

TANH(expression)

Returns the hyperbolic tangens of a value

RAD(expression)

Converts an angle measured in degrees to an approximately equivalent angle measured in radians

DEG(expression)

Converts an angle measured in radians to an approximately equivalent angle measured in degrees

Built in constants

Constant
Description

PI

The value of PI, exact to 100 digits

Last updated