Simple Math(simpleMath)
A simple calculator node that evaluates string math formulas.
simple Math
The Simple Math node (class simpleMath) is a simple calculator that evaluates a mathematical formula supplied as a string. It belongs to the EasyUse/Logic/Math category and is useful for quick arithmetic without adding dedicated math nodes.
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
value | STRING | Yes | "" | The mathematical formula to evaluate. |
a | ANYTYPE | No | — | Optional value that can be referenced in the formula as a. |
b | ANYTYPE | No | — | Optional value that can be referenced in the formula as b. |
c | ANYTYPE | No | — | Optional value that can be referenced in the formula as c. |
Write the formula to evaluate in the value field. If you need values from elsewhere in your workflow, connect them to a, b, or c and use those names as variables inside the formula string.
Outputs
The node provides three outputs from the same calculation:
- INT — the result converted to an integer.
- FLOAT — the result converted to a float.
- BOOLEAN — the result interpreted as a boolean value.
All three outputs are produced by the same evaluation, so you can choose the output type that best matches the downstream node.
Usage Notes
Because value is a string, the formula is evaluated at runtime. This makes it possible to build expressions dynamically, for example by connecting a text input or generated string to the formula box.
The optional a, b, and c inputs let you reuse the same formula with different values. For example, with a connected to a number, a formula such as a * 2 would evaluate that value multiplied by two.
The boolean output is useful when you need to treat the numeric result as a true/false condition in logic branches or conditional workflows.
Comments
Sign in with GitHub to join the discussion.