Module:Sports table/WDL: Difference between revisions

Content deleted Content added
typo
bug
Line 281:
local win_perc = mm._precision_format((2*wins + draws) / (2*matches), 3)
local ppg = mm._precision_format(points / matches, 2)
if ranking_style=='wperc' or ranking_style=='win percentage' or ranking_style=='wpct' then
win_perc = mm._precision_format(100 * wins / matches, 1)
end
if matches == 0 then
-- Escape for zero matches
Line 291 ⟶ 288:
-- Drop the leading zero (from the string)
win_perc = string.sub(win_perc,2,string.len(win_perc))
end
if ranking_style=='wperc' or ranking_style=='win percentage' or ranking_style=='wpct' then
if matches == 0 then
win_perc = '—'
else
win_perc = mm._precision_format(100 * wins / matches, 1)
end
end