Skip to content

Arithmetics

Expression Symbols

Operator Description Example
+ Addition 1 + 1 -> 2
- Subtraction 1 - 1 -> 0
* Multiplication 2 * 2 -> 4
/ Division 2 / 2 -> 1
// Floor Division 10 // 4 -> 2
^ Exponentiation 2 ^ 3 -> 8
% Modulus 10 % 3 -> 1
- Negation -2 -> 0 - 2

Implied Multiplication

expOrbit supports implied multiplication in expressions!

1
2
3
4
5
6
7
x = math.sin(2t)
z = math.cos(3t)

--[[ is the same as: ]]

x = math.sin(2 * t)
z = math.cos(3 * t)