mod: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
(Redirected page to math#mod)
Line 1: Line 1:
THIS FUNCTION DOES NOT EXIST IN MAPTOOL.
#REDIRECT [[math#mod]]
 
{{MacroFunction
|name=mod
|description=Returns the result of the modulo operation between the two numbers, which represents the remainder after a division operation.
 
|usage=
<source lang="mtmacro" line>
[h: val = mod(dividend,divisor)]
</source>
 
|examples=
<source lang="mtmacro" line>
[r: mod(14,6)]
</source>
Returns 2.
 
<source lang="mtmacro" line>
[r: mod(10,5)]
</source>
Returns 0.
 
<source lang="mtmacro" line>
[r: mod(-13,4)]
</source>
Returns 3.
 
<source lang="mtmacro" line>
[r: mod(16.4,7)]
</source>
Returns 2.4.
 
<source lang="mtmacro" line>
[r: mod(16,7.5)]
</source>
Returns 1.0.
}}
[[Category:Mathematical Function]]

Revision as of 20:12, 16 April 2020

Redirect to: