Template:Round: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
en>Jimp
No edit summary
en>Jimp
No edit summary
Line 1: Line 1:
<includeonly>{{#ifeq:{{#expr:{{{2}}}round0}}|{{{2}}}|{{#ifexpr:{{{2}}}<-3|{{rnd/+
<includeonly>{{#ifeq:{{#expr:{{{2}}}round0}}|{{#expr:{{{2}}}}}|{{#ifexpr:{{{2}}}<-3|{{rnd/+
|{{{1}}}
|{{{1}}}
|(-({{{2}}}))mod3
|(-({{{2}}}))mod3
Line 23: Line 23:
|-57|-58|-59=000000000000000000000000000000000000000000000000000000000
|-57|-58|-59=000000000000000000000000000000000000000000000000000000000
|-60|-61|-62=000000000000000000000000000000000000000000000000000000000000
|-60|-61|-62=000000000000000000000000000000000000000000000000000000000000
}}}}|{{rnd/-|{{#expr:{{{1}}}round{{{2}}}}}|{{{2}}}}}}}|{{{1}}}}}</includeonly><noinclude>This template rounds {{{1}}} to {{{2}}} decimal places (goes the other way for negatives), includes trailing zeros & avoids E notation.</noinclude>
}}}}|{{rnd/-|{{#expr:{{{1}}}round{{{2}}}}}|{{{2}}}}}}}|{{#expr:{{{1}}}}}}}</includeonly><noinclude>This template rounds {{{1}}} to {{{2}}} decimal places (goes the other way for negatives), includes trailing zeros & avoids E notation.</noinclude>

Revision as of 18:47, 24 September 2007

This template rounds {{{1}}} to {{{2}}} decimal places (goes the other way for negatives), includes trailing zeros & avoids E notation.