mod: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Added previously undocumented function)
(No difference)

Revision as of 20:58, 18 October 2014

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.