Template:GP-wins-losses-pct in table/doc
![]() | This is a documentation subpage for Template:GP-wins-losses-pct in table. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
This template reuses {{Wins-losses-pct in table}}
to calculate total number of games played and winning percentages (as 3-decimal place values between 0.000 and 1.000), given the number of wins (parameter 1) and losses (parameter 2). It displays total number of games played, number of wins, number of losses, and winning percentage, separated by double-pipes (for use in a wikitable).
Examples
{{GP-wins-losses-pct in table|3|0}}
produces 3 || 3 || 0 || 1.000{{GP-wins-losses-pct in table|6|9}}
produces 15 || 6 || 9 || .400{{GP-wins-losses-pct in table|0|5}}
produces 5 || 0 || 5 || .000{{GP-wins-losses-pct in table|0|0}}
produces 0 || 0 || 0 || –{{GP-wins-losses-pct in table|10|0}}
produces 10 || 10 || 0 || 1.000
<syntaxhighlight lang="wikitext">
Team | Games played | Wins | Losses | PCT |
---|---|---|---|---|
Bluebirds | 15 | 6 | 9 | .400 |
Blackbirds | 7 | 4 | 3 | .571 |
</syntaxhighlight>
produces:
Team | Games played | Wins | Losses | PCT |
---|---|---|---|---|
Bluebirds | 15 | 6 | 9 | .400 |
Blackbirds | 7 | 4 | 3 | .571 |
<syntaxhighlight lang="wikitext">
Season | Games played | Wins | Losses | PCT | Note |
---|---|---|---|---|---|
2011 | 14 | 4 | 10 | .286 | Did not qualify |
2012 | 14 | 8 | 6 | .571 | Won in semifinals |
2013 | 14 | 12 | 2 | .857 | Won in finals |
</syntaxhighlight>
produces:
Season | Games played | Wins | Losses | PCT | Note |
---|---|---|---|---|---|
2011 | 14 | 4 | 10 | .286 | Did not qualify |
2012 | 14 | 8 | 6 | .571 | Won in semifinals |
2013 | 14 | 12 | 2 | .857 | Won in finals |