The math function can be used to perform calculations, and the following operators can be utilized:
+, -, /, *, abs, ceil, cos, exp, floor, log, log10, max, min, pi, pow, rand, round, sin, sqrt, srans and tan
Arguments
Argument | Description |
---|---|
equation | The equation to execute |
format | The format of the result based on the sprintf method in PHP |
assign | Template variable the output will be assigned to |
Examples
* This can also be achieved using the rand function.