Template:Percentage: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Cydebot
m Robot - Moving category Mathematical templates to Mathematical function templates per CFD at Wikipedia:Categories for discussion/Log/2007 January 19.
Ookami (talk | contribs)
m 31 revisions imported
 
(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>{{#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 (zero or greater)'' }}
{{documentation}}
 
;Examples:
* <nowiki>{{Pct | 1 | 3 | 3 }}</nowiki> yields 33.333%
* <nowiki>{{Pct | 2 | 3 | 3 }}</nowiki> yields 67%
[[Category:Mathematical function templates|Pct]]
 
</noinclude>
</noinclude>

Latest revision as of 00:52, 3 September 2020