modulo

modulo

modulo

Syntax (modulo dividend divisor) → remainder
Arguments dividend: The dividend of the two numbers.
divisor: The divisor of the two numbers.
Returns remainder: The remainder of the two numbers passed
Category 0.99, math
Description Finds the remainder of the two numbers and returns it.

Important for many things including bounding an arbitrary number between two numbers.

Example

(modulo 3 2)

This code will return 1.

(modulo 56 34)

This code will return the number 22.

(modulo 10 4)

This code will return 2.

IMPORTANT: This function changed name to modulo from modulus in 0.98d.

See also divide

Return to Functions list