Math nodes
Math nodes calculate and generate numbers. See how nodes work for how to read the diagrams below.
Math
Performs basic math on two numbers.
Inputs
ExecuteFlow
ANumber
BNumber
Outputs
DoneFlow
ResultNumber
A [operation] B.
Properties
- Operation
- Add, Subtract, Multiply, Divide, Modulo, or Power. Default Add.
Divide and Modulo return 0 when B is 0. Unconnected inputs count as 0.
Clamp
Keeps a number between a minimum and a maximum.
Inputs
ExecuteFlow
ValueNumber
Outputs
DoneFlow
ResultNumber
Value, raised to Minimum or lowered to Maximum if it is outside the range.
Properties
- Minimum
- Default 0.
- Maximum
- Default 100.
Minimum must not be greater than Maximum, or the node fails.
Map Range
Converts a number from one range to another, for example 0–100 to 0–1.
Inputs
ExecuteFlow
ValueNumber
Outputs
DoneFlow
ResultNumber
Properties
- Input Min
- Default 0.
- Input Max
- Default 100.
- Output Min
- Default 0.
- Output Max
- Default 1.
- Clamp Output
- Keep the result inside the output range. Default on.
A value halfway through the input range comes out halfway through the output range. If Input Min and Input Max are equal, the result is Output Min.
Random
Generates a random number in a range.
Inputs
ExecuteFlow
Outputs
DoneFlow
ValueNumber
A random decimal between Minimum and Maximum.
IntegerNumber
Value rounded to the nearest whole number.
Properties
- Minimum
- Default 0.
- Maximum
- Default 100.
If Minimum is greater than Maximum, the two are swapped.