Formula
Last updated
Last updated
This node is responsible for calculating mathematical expressions.
The inputs can either be dynamic, as logic connections attached to the node or constants, present in the expression itself. The inputs can also be the value from other components using the tag notation system. The diagram designer can assign as many dynamic variables as needed to be used.
The Formula Node can use methods and properties from the math.js library.
To use any of the methods or properties from the library, all you need is to use the function name (without the 'math.') from the math.js reference.
The most common methods are:
equal(a, b)
smaller(a, b), smallerEq(a, b), larger(a, b), largerEq(a, b)
not(a)
sqrt(a)
Some names are reserved to the math.js function. That means, if you name a node the same as one of the math.js' methods or properties, the logic won't work.
Alongside with the Chain Connection's condition field, the Formula node can be a powerful tool to calculate if expressions.