Math: Numeric

Nodes in this category perform discontinuous numeric operations such as rounding, clamping, mapping, and randomization.

Nodes

NodeDetailsPossible Types
Absolute Value

The absolute value function (abs) removes the negative sign from an input value, if present.

With a vec2 input, this applies separately to the X and Y components. For the overall length of a vec2, see the "Magnitude" node instead.

Number → Number
Number[] → Number[]
Integer → Integer
Integer[] → Integer[]
Vec2 → Vec2
Vec2[] → Vec2[]
Average

Averages all the numbers in the input list. An empty list gives 0.

Number[] → Number
Ceiling

The ceiling function (ceil) rounds up an input value to the nearest whole number, unless the input number is already whole.

With a vec2 input, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Vec2 → Vec2
Vec2[] → Vec2[]
Clamp

The clamp function (clamp) restricts a number to a specified range between a minimum and maximum value. The minimum and maximum values are automatically swapped if they are reversed.

With vec2 inputs, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Integer → Integer
Integer[] → Integer[]
String → String
String[] → String[]
Vec2 → Vec2
Vec2[] → Vec2[]
Number → Vec2
Number[] → Vec2[]
Floor

The floor function (floor) rounds down an input value to the nearest whole number, unless the input number is already whole.

With a vec2 input, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Vec2 → Vec2
Vec2[] → Vec2[]
Greatest Common Divisor

The greatest common divisor (GCD) calculates the largest positive integer that divides both of the two input numbers without leaving a remainder.

Integer → Integer
Integer[] → Integer[]
Least Common Multiple

The least common multiple (LCM) calculates the smallest positive integer that is a multiple of both of the two input numbers.

Integer → Integer
Integer[] → Integer[]
Lerp

Linearly interpolates between the start and end values, where a factor of 0 gives the start value, 1 gives the end value, and 0.5 gives their midpoint.

With vec2 inputs, this traces the straight line path between the two points.

Number → Number
Number[] → Number[]
Vec2 → Vec2
Vec2[] → Vec2[]
Max

The maximum function (max) picks the larger of two numbers.

With vec2 inputs, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Integer → Integer
Integer[] → Integer[]
String → String
String[] → String[]
Vec2 → Vec2
Vec2[] → Vec2[]
Number → Vec2
Number[] → Vec2[]
Maximum

Gives the largest number in the input list. An empty list gives 0.

Number[] → Number
Min

The minimum function (min) picks the smaller of two numbers.

With vec2 inputs, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Integer → Integer
Integer[] → Integer[]
String → String
String[] → String[]
Vec2 → Vec2
Vec2[] → Vec2[]
Number → Vec2
Number[] → Vec2[]
Minimum

Gives the smallest number in the input list. An empty list gives 0.

Number[] → Number
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[]
Remap

Linearly maps an input value from one range to another. The ranges may be reversed.

For example, 0.5 in the input range [0, 1] would map to 0 in the output range [-180, 180].

Number → Number
Number[] → Number[]
Round

The rounding function (round) maps an input value to its nearest whole number. Halfway values are rounded away from zero.

With a vec2 input, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Vec2 → Vec2
Vec2[] → Vec2[]
Sign

The sign function (sign) reports whether an input value is positive (1), negative (-1), or zero (0).

With a vec2 input, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Vec2 → Vec2
Vec2[] → Vec2[]
Sum

Adds together all the numbers in the input list, producing their total.

Number[] → Number