Module:Sports table/College: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 240:
local win_perc = ''
local cwin_perc = ''
local include_ties = yesno(Args['include_ties'] or 'no')
if tonumber(matches) == nil or matches == 0 then
-- Escape for zero matches
Line 245 ⟶ 246:
else
--Some sports use tie as well
if include_ties then
win_perc = mm._precision_format((2*wins + ties) / (2*matches), 3)
else
cwin_perc win_perc = mm._precision_format((2*cwins + ctieswins) / (2*(cwins+cties+closses))matches - ties, 3)
end
if losses > 0 then
-- Drop the leading zero (from the string)
Line 256 ⟶ 261:
else
--Some sports use tie as well
if include_ties then
cwin_perc = mm._precision_format((2*cwins + cties) / (2*(cwins+cties+closses)), 3)
cwin_perc = mm._precision_format((2*cwins + cties) / (2*(cwins+cties+closses)), 3)
else
cwin_perc = mm._precision_format(cwins / (cwins+closses), 3)
end
if closses > 0 then
-- Drop the leading zero (from the string)