Module:Sandbox/Lemondoge/Calc/doc explained

Usage

Performs a calculation.

{{#invoke:|add|5|8}}

Examples

<nowiki>{{#invoke:Sandbox/Lemondoge/Calc|add|3|6}}</nowiki> returns

<nowiki>{{#invoke:Sandbox/Lemondoge/Calc|minus|6|3}}</nowiki> returns

<nowiki>{{#invoke:Sandbox/Lemondoge/Calc|mod|3|15}}</nowiki> returns

Error detection

The "times" function (but not the VERY similar "multiplication" function) will return a error like this: "", if the second parameter is 0, unless the third parameter is set to 1. This works by using the code below.if num2

Anti-not-a-number mechanism

The "division" function (and it's similar "div" function) will normally return "" if all 3 parameters are set to 0, but if the third parameter is 1, it will return "" instead. This works with the code below:if num1

0 and num2

0 and antinotanumber