Units
This page describes all functions and operations available for units
Usage
Most basic unit is plain number, such as '1' or '4.5'. You can use variables with $ like '$example'. Each function requires name parenthesis and comma separated arguments e.g. 'min(PI, $example)'. You can combine as many as you want, e.g. 'min(PI, 10 + $example)'. You can do pretty complex infix, e.g. atan2($mouseY, $mouseX) - HALF_PI - HALF_PI / 2.
Constants
- true - boolean true value, equal to 1.0
- false - boolean false value, equal to 0.0
- PI - number equal to 3.14159265358979323846
- HALF_PI - number equal to 1.57079632679
- TWO_PI - number equal to 6.28318530718
- E - number equal to 2.7182818284590452354
Operations
-cond ? a : b = TERNARY, if cond then a, else b(-a = NEGATE
Functions
- random()
- time()