Module:Sports table/WDL: Difference between revisions

Content deleted Content added
extend precision for non_ratio display to 2 decimal places
amend lines 301/2 to allow win_perc to cope with points deductions
Line 299:
--Some sports use draw as well
win_perc = (pct_style == 'ratio') and
mm._precision_format((2*wins + draws + s_pts) / (2*matches), 3) or
mm._precision_format(100*(2*wins + draws + s_pts) / (2*matches), 2)
-- Allow win_perc to be altered due to point deductions/additions
ppg = mm._precision_format(points / matches, 2)
if (losses > 0 or draws > 0) and pct_style == 'ratio' then