Шаблон:Round: различия между версиями

48 байт добавлено ,  09:48, 21 сентября 2007
interger check
en>Jimp
(a few adjustments + explanation)
en>Jimp
(interger check)
Строка 1: Строка 1:
<includeonly>{{#ifexpr:{{{2}}}<-3|{{rnd/+
<includeonly>{{#ifeq:{{#expr:{{{2}}}round0|{{{2}}}|{{#ifexpr:{{{2}}}<-3|{{rnd/+
|{{{1}}}
|{{{1}}}
|(-({{{2}}}))mod3
|(-({{{2}}}))mod3
Строка 23: Строка 23:
|-57|-58|-59=000000000000000000000000000000000000000000000000000000000
|-57|-58|-59=000000000000000000000000000000000000000000000000000000000
|-60|-61|-62=000000000000000000000000000000000000000000000000000000000000
|-60|-61|-62=000000000000000000000000000000000000000000000000000000000000
}}}}|{{rnd/-|{{#expr:{{{1}}}round{{{2}}}}}|{{{2}}}}}}}</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}}}}}}}|{{{1}}}}}</includeonly><noinclude>This template rounds {{{1}}} to {{{2}}} decimal places (goes the other way for negatives), includes trailing zeros & avoids E notation.</noinclude>
Анонимный участник