Difference between revisions of "Template:Rnd/-"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
m (9 revisions from wikipedia:Template:Rnd/-)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{{1}}}<!--
+
<includeonly>{{#expr:{{{1}}}}}<!--
 
-->{{#ifexpr: {{{2}}}>0  and {{{1}}}={{{1}}}round0 |.0}}<!--
 
-->{{#ifexpr: {{{2}}}>0  and {{{1}}}={{{1}}}round0 |.0}}<!--
 
-->{{#ifexpr: {{{2}}}>1  and {{{1}}}={{{1}}}round1  |0}}<!--
 
-->{{#ifexpr: {{{2}}}>1  and {{{1}}}={{{1}}}round1  |0}}<!--
Line 13: Line 13:
 
-->{{#ifexpr: {{{2}}}>11 and {{{1}}}={{{1}}}round11 |0}}<!--
 
-->{{#ifexpr: {{{2}}}>11 and {{{1}}}={{{1}}}round11 |0}}<!--
 
-->{{#ifexpr: {{{2}}}>12 and {{{1}}}={{{1}}}round12 |0}}<!--
 
-->{{#ifexpr: {{{2}}}>12 and {{{1}}}={{{1}}}round12 |0}}<!--
--></includeonly><noinclude>This adds the trailing zeros.</noinclude>
+
--></includeonly><noinclude>{{doc}}</noinclude>

Latest revision as of 08:42, 15 March 2016

Documentation icon Template documentation[view] [edit] [history] [purge]

This subtemplate of {{rnd}} adds trailing zeros. It takes two parameters.

  1. the number to be displayed
  2. the number of significant figures to be displayed after the decimal point
  • {{rnd/-|2|3}} → 2.000
  • {{rnd/-|1E+5|3}} → 100000.000

It's used by Template:rnd (backlinks edit).

It's also used by Template:rndnear (backlinks edit) and Template:rndpad (backlinks edit).bn:টেমপ্লেট:Rnd/- pt:Predefinição:Rnd/- sl:Predloga:Rnd/-