The formula string (e.g., "0.5 * {numStacks}", "10 + floor({str}/2)")
Optionalcontext: object = {}
Context object with token values (e.g., { numStacks: 3 })
Optionalactor: any = null
Optional actor for attribute/vector token resolution
Optionaloptions: { floor?: boolean } = {}
Configuration options
Optionalfloor?: booleanWhether to floor the result to an integer
The result, optionally floored
Evaluate a modifier formula string to a number (floored by default). The formula can contain:
By default, the result is floored to an integer before returning. This behavior can be controlled via the options parameter.