Template:Percentage: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Eliyak
(examples should actually use the template)
m (31 revisions imported)
 
(27 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<includeonly>{{#expr: {{{1}}}/{{{2}}}*100 round {{#ifeq: {{#expr: {{{3}}} >= 0 }} | 1 | {{{3}}} | 0 }} }}%</includeonly><noinclude>
<includeonly>{{#invoke:Percentage|main|{{#expr:{{formatnum:{{{1|0}}}|R}}}}|{{#expr:{{formatnum:{{{2|100}}}|R}}}}|{{{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 }}
[[Category:Mathematical function templates|Pct]]
 
</noinclude>
</noinclude>

Latest revision as of 00:52, 3 September 2020