Jump to content

Template:GP-wins-losses-pct in table/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

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

[edit]
 {| class=wikitable
 ! Team !! Games played !! Wins !! Losses !! PCT
 |-
 | Bluebirds  || {{GP-wins-losses-pct in table|6|9}}
 |-
 | Blackbirds || {{GP-wins-losses-pct in table|4|3}}
 |}

produces:

Team Games played Wins Losses PCT
Bluebirds 15 6 9 .400
Blackbirds 7 4 3 .571

 {| class=wikitable
 ! Season !! Games played !! Wins !! Losses !! PCT !! Note
 |-
 | 2011 || {{GP-wins-losses-pct in table|4|10}} || Did not qualify
 |-
 | 2012 || {{GP-wins-losses-pct in table|8|6}}  || Won in semifinals
 |-
 | 2013 || {{GP-wins-losses-pct in table|12|2}} || Won in finals
 |}

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

See also

[edit]