@dice-roller/rpg-dice-roller / ast / fn
Function: fn()
fn(
name, ...args):FunctionNode
Defined in: src/ast/builders.ts:173
A maths function call, e.g. fn("floor", binary("/", pool(2, 6), 2)). Arity is checked at evaluation.
Parameters
name
"abs" | "ceil" | "cos" | "exp" | "floor" | "log" | "round" | "sign" | "sin" | "sqrt" | "tan" | "pow" | "max" | "min" | "trunc"
args
...ExpressionInput[]