Houdini 20.5 Nodes APEX nodes

Modulo

Applies the modulo operation to the two input values.

On this page
Since 20.0

The modulo operation calculates the remainder of dividing the dividend by the modulus.

Note

This implementation uses the same convention as Python for negative numbers, which provides convenient wrapping behaviors. For example, if it is currently 16:00 on a 24-hour clock, and you want to know the time it was 30 hours ago, the calculation (16 - 30) mod 24 = -14 mod 24 = 10 results in a time of 10:00.

Inputs

a: Int

The dividend of the operation.

b: Int

The modulus of the operation.

Outputs

result: Int

The remainder of the modulo operation.

See also

APEX nodes