mod
Modulo operation (positive result).
Syntax
Section titled “Syntax”C = mod(A, B)Description
Section titled “Description”Returns the remainder A - floor(A/B) * B. The result has the same sign as B (so mod(-5, 3) = 1, not -2). Use rem for the C-style truncated form.
Examples
Section titled “Examples”mod(7, 3) % 1mod(-7, 3) % 2 (positive result)