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. |
meta>Eliyak examples should actually use the template |
||
Line 1: | Line 1: | ||
<includeonly>{{#expr: {{{1}}}/{{{2}}}*100 round {{#ifeq: {{#expr: {{{3}}} >= 0 }} | 1 | {{{3}}} | 0 }} }}%</includeonly><noinclude> | <includeonly>{{#expr: {{{1}}}/{{{2}}}*100 round {{#ifeq: {{#expr: {{{3}}} >= 0 }} | 1 | {{{3}}} | 0 }} }}%</includeonly><noinclude> | ||
;Usage: <nowiki>{{</nowiki>Pct| ''numerator'' | ''denominator'' | ''decimals (zero or greater)'' }} | ;Usage: <nowiki>{{</nowiki>Pct| ''numerator'' | ''denominator'' | ''decimals to round to (zero or greater)'' }} | ||
;Examples: | ;Examples: | ||
* <nowiki>{{Pct | 1 | 3 | 3 }}</nowiki> yields | * <nowiki>{{Pct | 1 | 3 | 3 }}</nowiki> yields {{Pct | 1 | 3 | 3 }} | ||
* <nowiki>{{Pct | 2 | | * <nowiki>{{Pct | 2 | 10 | 3 }}</nowiki> yields {{Pct | 2 | 10 | 3 }} | ||
[[Category:Mathematical function templates|Pct]] | [[Category:Mathematical function templates|Pct]] | ||
</noinclude> | </noinclude> |
Revision as of 21:09, 11 July 2007
- Usage
- {{Pct| numerator | denominator | decimals to round to (zero or greater) }}
- Examples
- {{Pct | 1 | 3 | 3 }} yields Template:Pct
- {{Pct | 2 | 10 | 3 }} yields Template:Pct