mod

From RPTools Wiki
Revision as of 20:58, 18 October 2014 by True Hitoare (talk | contribs) (Added previously undocumented function)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

mod() Function

Returns the result of the modulo operation between the two numbers, which represents the remainder after a division operation.

Usage

[h: val = mod(dividend,divisor)]

Examples

[r: mod(14,6)]

Returns 2.

[r: mod(10,5)]

Returns 0.

[r: mod(-13,4)]

Returns 3.

[r: mod(16.4,7)]

Returns 2.4.

[r: mod(16,7.5)]
Returns 1.0.