Difference between revisions of "Template:IsEven"

From PlantUse English
Jump to: navigation, search
(Created page with "<includeonly>{{#vardefine: data|{{{1}}}}}{{#vardefine: dec|{{#expr:{{#var:data}}/2}} }}{{#vardefine:trunk|{{#expr:trunc{{#var:dec}}}} }}{{#ifeq:{{#var:dec}}|{{#var:trunk}}|true|}...")
(No difference)

Revision as of 09:46, 11 May 2011


Template to test if a number is even or not

Parameters :

the number to test return true if even, false if not

Exemple

{{IsEven|1}} returns {{IsEven|21}} returns {{IsEven|42}} returns true