Skip to content

Expressions

Expressions are used to define calculations used for different purposes. They can have variables to allow more advanced configuration.

Constants

  • pi - returns ratio of the circumference of a circle to its diameter
  • tau - returns ratio of the circumference of a circle to its radius
  • e - return the Euler's number

Operators

  • x + y - add
  • x - y - subtract
  • x * y - multiply
  • x / y - divided
  • x ^ y - exponentiation
  • -x - negation
  • x & y - and
  • x | y - or
  • !x - not

Functions

  • sin(x) - returns the sine of a number in radians
  • cos(x) - returns the cosine of a number in radians
  • tan(x) - returns the tangent of a number in radians
  • asin(x) - returns the inverse sine (in radians) of a number
  • acos(x) - returns the inverse cosine (in radians) of a number
  • atan(x) - returns the inverse tangent (in radians) of a number
  • sinh(x) - returns the hyperbolic sine of a number
  • cosh(x) - returns the hyperbolic cosine of a number
  • tanh(x) - returns the hyperbolic tangent of a number
  • log(x) - returns the natural logarithm (base e) of a number
  • exp(x) - returns e raised to the power of a number
  • sqrt(x) - returns the square root of a number
  • cbrt(x) - returns the cube root of a number
  • floor(x) - returns the largest integer smaller than or equal to the input
  • ceil(x) - returns the smallest integer greater than or equal to the input
  • round(x) - returns the value of a number rounded to the nearest integer
  • trunc(x) - returns the integer part of a number by removing any fractional digits
  • abs(x) - returns the absolute value of a number
  • sign(x) - returns -1 if the number is less than 0, 1 if the number is greater than 0, and 0 if the number is 0
  • fract(x) - returns the fractional part of a number
  • mod(x, y) - returns the value of modulo of two numbers
  • mix(x, y, t) - returns the linear interpolation between two values
  • clamp(x, min, max) - returns a value constrained between two further values
  • min(x, y, z, ...) - returns the smallest of the numbers given as input
  • max(x, y, z, ...) - returns the largest of the numbers given as input