|
|
(3 intermediate revisions by 2 users not shown) |
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]]
| |