Module:MLB standings: Difference between revisions

Content deleted Content added
change error handling of seeds parameter, so if one seed is specified incorrectly, the others will still be processed
minor change for legibility: move calculation of winning percentage out of display code
Line 188:
 
end
 
local winningPercentage = string.format(
|| ' .. string.format( '%.3f', teamInfo.wins / ( teamInfo.wins + teamInfo.losses )) .. '\
)
 
local seedText = ''
Line 206 ⟶ 210:
nameStyle .. '| ' .. seedText .. '[[' .. year .. ' ' .. teamInfo.name .. ' season|' .. teamInfo.name .. ']]\
|| ' .. teamInfo.wins .. ' || ' .. teamInfo.losses .. '\
|| ' .. winningPercentage .. '\
|| ' .. string.format('%.3f', teamInfo.wins / ( teamInfo.wins + teamInfo.losses )) .. '\
|| ' .. gamesBehind .. '\
|| ' .. teamInfo.homeWins .. '–' .. teamInfo.homeLosses ..'\