Math

Nodes in this category evaluate math expressions, convert between numbers and text, and generate random numbers.

Nodes

NodeDetailsPossible Types
Format Number

Formats a number as a string with control over decimal places, decimal separator, and thousands grouping.

Number → String
Number[] → String[]
Math f(x)

Evaluates a math expression written in terms of the single variable x, which carries the input value, or X when the input is a Transform.

The result is read as the chosen output type: an Integer rounds to the nearest whole number, a Bool reads exactly 0 or 1 as false or true, a Vec2 takes the X and Y of a vector like 3i + 4j, and a Transform takes a matrix like rotation(pi/4) + 5i. A boolean input reads as 0 or 1 and a Vec2 input as such a vector.

Number → Number
Number[] → Number[]
Number → Integer
Number[] → Integer[]
Number → Bool
Number[] → Bool[]
Number → Vec2
Number[] → Vec2[]
Number → Transform
Number[] → Transform[]
Integer → Number
Integer[] → Number[]
Integer → Integer
Integer[] → Integer[]
Integer → Bool
Integer[] → Bool[]
Integer → Vec2
Integer[] → Vec2[]
Integer → Transform
Integer[] → Transform[]
Bool → Number
Bool[] → Number[]
Bool → Integer
Bool[] → Integer[]
Bool → Bool
Bool[] → Bool[]
Bool → Vec2
Bool[] → Vec2[]
Bool → Transform
Bool[] → Transform[]
Vec2 → Number
Vec2[] → Number[]
Vec2 → Integer
Vec2[] → Integer[]
Vec2 → Bool
Vec2[] → Bool[]
Vec2 → Vec2
Vec2[] → Vec2[]
Vec2 → Transform
Vec2[] → Transform[]
Transform → Number
Transform[] → Number[]
Transform → Integer
Transform[] → Integer[]
Transform → Bool
Transform[] → Bool[]
Transform → Vec2
Transform[] → Vec2[]
Transform → Transform
Transform[] → Transform[]
Math f(…)

Evaluates a math expression across all of the input items at once. A full expression reads the items as a, b, c, …, or as A, B, C, … for Transforms, while a math operator or N-argument function name (like * or min) applies across every item.

The result is read as the chosen output type: an Integer rounds to the nearest whole number, a Bool reads exactly 0 or 1 as false or true, a Vec2 takes the X and Y of a vector like 3i + 4j, and a Transform takes a matrix like rotation(pi/4) + 5i. Boolean items read as 0 or 1 and Vec2 items as such vectors. Across Transforms, * and / compose in order, mean averages, and count counts.

Number[] → Number
Number[] → Integer
Number[] → Bool
Number[] → Vec2
Number[] → Transform
Integer[] → Number
Integer[] → Integer
Integer[] → Bool
Integer[] → Vec2
Integer[] → Transform
Bool[] → Number
Bool[] → Integer
Bool[] → Bool
Bool[] → Vec2
Bool[] → Transform
Vec2[] → Number
Vec2[] → Integer
Vec2[] → Bool
Vec2[] → Vec2
Vec2[] → Transform
Transform[] → Number
Transform[] → Integer
Transform[] → Bool
Transform[] → Vec2
Transform[] → Transform
Random

The random function (rand) converts a seed into a random number within the specified range, inclusive of the minimum and exclusive of the maximum. The minimum and maximum values are automatically swapped if they are reversed.

→ Number
→ Number[]
String to Number

Parses a string into a number. Falls back to the chosen value if the string is not a valid number.

String → Number
String[] → Number[]