Jump to content

Template:Percentage: Difference between revisions

From cernipedia
«+";Aliases: * {{tl|%}} * {{tl|percentage}} * {{tl|percent}}", "Pct" → "Percentage"»
m 33 revisions imported from wikipedia:Template:Percentage
 
(28 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<includeonly>{{#expr: {{{1}}}/{{{2}}}*100 round {{#ifeq: {{#expr: {{{3}}} >= 0 }} | 1 | {{{3}}} | 0 }} }}%</includeonly><noinclude>
<includeonly>{{safesubst:<noinclude/>#invoke:Percentage|main|{{{1|0}}}|{{{2|100}}}|{{{3|}}}|pad={{{pad|}}}|sigfig={{{sigfig|}}}|%={{{%|%}}}|nonscinote={{{nonscinote|}}}
 
}}</includeonly><noinclude>
;Usage: <nowiki>{{</nowiki>Pct| ''numerator'' | ''denominator'' | ''decimals to round to (zero or greater)'' }}
{{documentation}}
 
;Examples:
* <nowiki>{{Pct | 1 | 3 | 3 }}</nowiki> yields {{Pct | 1 | 3 | 3 }}
* <nowiki>{{Pct | 2 | 10 | 3 }}</nowiki> yields {{Pct | 2 | 10 | 3 }}
 
;Aliases:
* {{tl|%}}
* {{tl|percentage}}
* {{tl|percent}}
 
[[Category:Mathematical function templates|Percentage]]
 
</noinclude>
</noinclude>

Latest revision as of 13:13, 19 November 2026