Template:Ratio: Difference between revisions

From PS4 Developer wiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{#ifexpr:{{{1}}}=0 AND {{{1}}}={{#if:{{{total|}}}|{{{total}}}|{{{2}}}}}|0|{{#expr:{{{1}}}/({{#if:{{{total|}}}|{{{total}}}|{{{1}}}+{{{2}}}}}) * 100 ROUND {{{round...")
 
mNo edit summary
 
Line 1: Line 1:
<includeonly>{{#ifexpr:{{{1}}}=0 AND {{{1}}}={{#if:{{{total|}}}|{{{total}}}|{{{2}}}}}|0|{{#expr:{{{1}}}/({{#if:{{{total|}}}|{{{total}}}|{{{1}}}+{{{2}}}}}) * 100 ROUND {{{round|1}}}}}}}{{{text|%&nbsp;(<sup style="line-height:0;">{{{1}}}</sup>/<sub style="line-height:0;">{{#expr:{{#if:{{{total|}}}|{{{total}}}|{{{1}}}+{{{2}}}}}}}</sub>)}}}</includeonly><noinclude>
<includeonly>{{#ifexpr:{{{1}}}=0 AND {{{1}}}={{#if:{{{total|}}}|{{{total}}}|{{{2}}}}}|0|{{#expr:{{{1}}}/({{#if:{{{total|}}}|{{{total}}}|{{{1}}}+{{{2}}}}}) * 100 ROUND {{{round|1}}}}}}}{{{text|%&nbsp;(<sup style="line-height:0;">{{{1}}}</sup>/<sub style="line-height:0;">{{#expr:{{#if:{{{total|}}}|{{{total}}}|{{{1}}}+{{{2}}}}}}}</sub>)}}}</includeonly><noinclude>[[Category:Templates]]


==Usage==
==Usage==

Latest revision as of 06:01, 30 January 2014


Usage[edit source]

{{ratio|1|2}}
33.3% (1/3)
{{ratio|1|2|text=!!!!!}}
33.3!!!!!
{{ratio|1|total=3}}
33.3% (1/3)
{{ratio|1|2|round=4}}
33.3333% (1/3)

Displays a ratio of the first number to the total of both numbers.