ਫਰਮਾ:Winning percentage/doc
ਦਿੱਖ
ਇਹ ਇੱਕ ਫਰਮਾ:Winning percentage ਲਈ documentation ਉਪ ਸਫ਼ਾ ਹੈ। ਇਸ ਵਿੱਚ ਵਰਤੋਂ ਦੀ ਜਾਣਕਾਰੀ, ਸ਼੍ਰੇਣੀਆਂ ਅਤੇ ਹੋਰ ਸਮੱਗਰੀ ਜੋ ਮੂਲ ਦਾ ਹਿੱਸਾ ਨਹੀਂ ਹੈ, ਸ਼ਾਮਲ ਹੈ। ਫਰਮਾ page. |
This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
Usage
[ਸੋਧੋ]This template calculates and displays the winning percentage for sports teams given three parameters: wins, losses and ties. Those three parameters are unnamed.
{{Winning percentage|<wins>|<losses>|<ties>}}
Wins and losses are required; ties are optional.
The result is displayed as a decimal point followed by three digits, as is standard in sports standings. 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.
In scenarios where ties are not regarded as half a win, using |ignore_ties=y
will omit ties and equate the winning percentage exactly as wins divided by the total number of games/matches played (i.e. wins plus draws plus losses).
Code | Result | Explanation | Calculation |
---|---|---|---|
{{Winning percentage|30|20}}
|
.600 | <win> / <total> | .600 = 30 / (30+20) |
{{Winning percentage|30|20|50}}
|
.550 | (<win> + (<ties>/2)) / <total> | .550 = (30+(50/2)) / (30+20+50) |
{{Winning percentage|30|20|50|ignore_ties=y}}
|
.300 | <win> / <total-without-ties> | .300 = 30 / (30 + 20 + 50) |
{{Winning percentage|100|50|record=y}}
|
100–50 (.667) | Showing records along with calculated percentage | |
{{Winning percentage|100|50|3|leading_zero=y|record=y}}
|
100–50–3 (0.663) | showing records and percentage with leading zero | |
{{Winning percentage|100|50|leading_zero=y}}
|
0.667 | show percentage with leading zero | |
{{Winning percentage|100|0}}
|
1.000 | 100% winning | |
{{Winning percentage|0|4}}
|
.000 | 0% winning | |
{{Winning percentage|0|0}}
|
– | No match played, so a percentage is not mathematically possible |
Aliases
[ਸੋਧੋ]See also
[ਸੋਧੋ]- {{Win-loss record}}
- {{Wins-losses-pct in table}}
- {{Percentage}}