Modulo

The modulo operation (%) calculates the remainder from the division of two scalar numbers or vectors.

The sign of the result shares the sign of the numerator unless Always Positive is enabled.

Interface

Inputs

ParameterDetailsPossible Types
Numerator

The left-hand side of the modulo operation.

Primary Input

Vec2[]
Vec2
f32[]
f32
f64[]
f64
u32[]
u32
Modulus

The right-hand side of the modulo operation.

Default: 2

Vec2[]
Vec2
f32[]
f32
f64[]
f64
u32[]
u32
Always Positive

Ensures the result is always positive, even if the numerator is negative.

Default: true

bool[]
bool

Outputs

ProductDetailsPossible Types
Result

The value produced by the node operation.

Primary Output

f64
f64[]
f32
f32[]
u32
u32[]
Vec2
Vec2[]