Content deleted Content added
SocietyBox (talk | contribs) show_nrr_fa |
SocietyBox (talk | contribs) m show_nrr_fa |
||
Line 106:
local function
if overs == 0 then
return 0
end
local balls = overs % 1
return runs / (overs - balls +
end
Line 189 ⟶ 192:
end
local nrr_for = rr_to_dec(runsscored,
local nrr_against = rr_to_dec(runsconceded,
-- Set Net Run Rate. This is probabaly over-engineered and could just be done with a single precalculated value
Line 250 ⟶ 253:
end
if show_nrr_fa then
local nrr_for_text = oversreceived > 0 and runsscored..'/'..oversreceived or '—'
local nrr_against_text = oversbowled > 0 and runsconceded..'/'..oversbowled or '—'
table.insert(t, '| data-sort-value="'..nrr_for..'" style="'..ii_fw..bg_col..'" |'..nrr_for_text..'\n')
table.insert(t, '| data-sort-value="'..nrr_against..'" style="'..ii_fw..bg_col..'" |'..nrr_against_text..'\n')
|