Skip to main content

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 operation requires parenthesis around it, e.g '(10 + $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))'.

Constants
  • PI == 3.141592653589793
  • E == 2.718281828459045
  • true == 1.0
  • false == 0.0
Operations
  • -a
  • (a + b)
  • (a - b)
  • (a * b)
  • (a / b)
  • (a % b)
  • (a & b)
  • (a | b)
  • (a ^ b)
  • !a
  • (a << b)
  • (a >> b)
  • (a == b)
  • (a != b)
  • (a > b)
  • (a < b)
  • (a >= b)
  • (a <= b)
Functions
  • random()
  • time()
  • min(a, b)
  • max(a, b)
  • pow(a, b)
  • abs(a)
  • sin(a)
  • cos(a)
  • tan(a)
  • atan(a)
  • atan2(y, x)
  • deg(a)
  • rad(a)
  • log(a)
  • log10(a)
  • log1p(a)
  • sqrt(a)
  • sq(a)
  • floor(a)
  • ceil(a)
  • if(statement, trueUnit, falseUnit)