Content deleted Content added
No edit summary |
Plastikspork (talk | contribs) Fix division by zero |
||
Line 184:
--Some sports use draw as well
local win_perc =
if matches == 0 then
-- Escape for zero matches
win_perc = '—'
else
elseif losses > 0 then▼
win_perc = mm._precision_format((2*wins) / (2*matches), 3)
-- Drop the leading zero (from the string)▼
win_perc = string.sub(win_perc,2,string.len(win_perc))▼
▲ -- Drop the leading zero (from the string)
▲ win_perc = string.sub(win_perc,2,string.len(win_perc))
end
end
|