Module:Sports table/Badminton team: Difference between revisions

Content deleted Content added
No edit summary
fix nan
Line 218:
local points = win_points*wins + loss_points*losses + s_pts
local win_perc = ''
--Some sports use draw as well
local win_perc = mm._precision_format((2*wins) / (2*matches), 3)
if matches == 0 then
-- Escape for zero matches
win_perc = '—'
else
elseif losses > 0 then
--Some sports use draw as well
-- Drop the leading zero (from the string)
win_perc = stringmm.sub_precision_format((win_perc,2,string.len*wins) / (win_perc2*matches), 3)
elseif if losses > 0 then
-- Drop the leading zero (from the string)
win_perc = string.sub(win_perc,2,string.len(win_perc))
end
end