Content deleted Content added
S.A. Julio (talk | contribs) m fix wording |
S.A. Julio (talk | contribs) support alternate output |
||
Line 153:
--Some sports use draw as well
local percentage_format = Args['percentage_format']
local point_perc = mm._precision_format((points) / (matches*win_points), 3)▼
if percentage_format == 'hundred' or percentage_format == 100 then
local point_perc = mm._precision_format(((points) / (matches*win_points)*100), 2)
else
percentage_format = 'no'
end
if matches == 0 then
-- Escape for zero matches
point_perc = '—'
elseif points ~= (matches*win_points) and percentage_format == 'no' then
-- Drop the leading zero (from the string)
point_perc = string.sub(point_perc,2,string.len(point_perc))
|