A collection of functions for basic math and logic. These are provided as a stopgap measure until the Origami language can handle basic math operations.
Any string values passed to the math functions are parsed as numbers before doing the math.
Commands by name
calc:
add(a, b, …)
Add the numbers
calc:
and(a, b, …)
Return true if all the arguments are true
calc:
divide(a, b)
Divide a by b
calc:
equals(a, b)
Return true if a equals b
calc:
if(a, b, c)
If a is true return b, otherwise c
calc:
multiply(a, b, …)
Multiply the numbers
calc:
not(value)
Return true if a is false and vice versa
calc:
or(a, b, …)
Return true if any of the arguments are true
calc:
subtract(a, b)
Subtract b from a