Difference between revisions of "Template:Modulo"
Jump to navigation
Jump to search
Kevin Wang (talk | contribs) (Created page with "<includeonly>{{#expr:{{MaybeVar|{{{1}}}}} mod {{MaybeVar|{{{2|}}}|1}}}}</includeonly><noinclude> {{Template doc| Shorthand for computing the modulus of two variables: "<nowiki...") |
Kevin Wang (talk | contribs) m |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{#expr:{{MaybeVar|{{{1}}}}} mod {{MaybeVar|{{{2|}}}|1}}}}</includeonly><noinclude> | <includeonly>{{#expr:{{MaybeVar|{{{1}}}}} mod {{MaybeVar|{{{2|}}}|1}}}}</includeonly><noinclude> | ||
{{Template doc| | {{Template doc| | ||
| − | Shorthand for computing the modulus of two variables: "<nowiki>{{#expr:{{{1 | + | Shorthand for computing the modulus of two variables: "<nowiki>{{#expr:{{MaybeVar|{{{1}}}}} mod {{MaybeVar|{{{2|}}}|1}}}}</nowiki>" |
Named "Modulo" instead of "Mod" to avoid ambiguity. | Named "Modulo" instead of "Mod" to avoid ambiguity. | ||
| − | See also: [[Template:Add|Add]], [[Template: Multiply| Multiply]] | + | See also: [[Template:Add|Add]], [[Template: Multiply| Multiply]], [[Template: MaybeVar| MaybeVar]] |
<pre> | <pre> | ||
Latest revision as of 18:42, 14 December 2025
Template documentation
Shorthand for computing the modulus of two variables: "{{#expr:{{MaybeVar|{{{1}}}}} mod {{MaybeVar|{{{2|}}}|1}}}}"
Named "Modulo" instead of "Mod" to avoid ambiguity.
See also: Add, Multiply, MaybeVar
{{#vardefine:x|10}}{{#vardefine:y|3}}
{{Modulo|x|y}}, {{Modulo|5|y}}, {{Modulo|x|2}}, {{Modulo|9|5}}
1, 2, 0, 4