Template:Winning percentage

From Ava Zinn Wiki
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]

Usage[edit]

This template calculates the winning percentage given three parameters: wins, losses and ties. Those three parameters are unnamed.

{{Winning percentage|<wins>|<losses>|<ties>}}

Wins and losses are required while ties are optional. In addition, including |leading_zero=y will add a leading 0 before the period (.), while adding |record=y will show the record followed by the winning percentage.

Code Result
{{Winning percentage|100|50|3}} Expression error: Unrecognized punctuation character "{".
{{Winning percentage|100|50}} Expression error: Unrecognized punctuation character "{".
{{Winning percentage|100|50|record=y}} 100–50 (Expression error: Unrecognized punctuation character "{".)
{{Winning percentage|100|50|3|leading_zero=y|record=y}} 100–50–3 (0Expression error: Unrecognized punctuation character "{".)
{{Winning percentage|100|50|leading_zero=y}} 0Expression error: Unrecognized punctuation character "{".
{{Winning percentage|100|0}} 1.000
{{Winning percentage|0|4}} .000
{{Winning percentage|0|0}}

Aliases[edit]

See also[edit]