Contents
Basic Math Operators
The following operators are basic operators which need a target element or a value to calculate with:
- Addition ( + )
- Subtraction ( – )
- Multiplication ( * )
- Division ( / )
- Power ( ^ )
- Equals ( = )
This example shows how you can perform a basic calculation with the plugin which is equal to the following math formula: Width * Height * 100
Advanced Math Operators
The advanced operators don’t need a target or a custom value to calculate with:
- Subtotal
- Takes the current subtotal loop value
- Abs (absolute)
- Abs -3 = 3
- Ceil (ceiling)
- Ceil 3.1 = 4
- Floor
- Floor 3.9 = 3
- Round
- Round 3.4 = 3
- Sqrt (square root)
- Sqrt 16 = 4
- Log (natural logarithm base e)
- Log 10 = 2.302585092994046
- Log2 (base 2)
- Log2 1024 = 10
- Log10 (base 10)
- Log10 100000 = 5
Round operator example in action. Note that both the target element and the value input field is greyed out in the round operator row as it doesn’t need any of them to perform the calculation:
Math Constants
The following math constants can be used in the value column. The plugin will automatically replace the text with the relevant math value.
Value | Constant |
---|---|
pi | pi constant |
pi2 | pi / 2 |
pi4 | pi / 4 |
1pi | 1 / pi |
2pi | 2 / pi |
sqrtpi | sqrt(pi) |
2sqrtpi | 2 / sqrt(pi) |
e | e constant |
euler | euler constant |
lnpi | log_e(pi) |
ln2 | log_e(2) |
ln10 | log_e(10) |
log2e | log_2(e) |
log10e | log_10(e) |