Content deleted Content added
S.A. Julio (talk | contribs) m adjust |
S.A. Julio (talk | contribs) decimal options |
||
Line 155:
local percentage_format = Args['percentage_format']
local point_perc
if percentage_format == 'hundred 1 decimal' then
point_perc = mm._precision_format(((points) / (matches*win_points)*100), 1)
elseif percentage_format == 'hundred 2 decimals' then
point_perc = mm._precision_format(((points) / (matches*win_points)*100), 2)
else
point_perc = mm._precision_format((points) / (matches*win_points), 3)
percentage_format = 'no'
end
if matches == 0 then
-- Escape for zero matches
point_perc = '—'
elseif points ~= (matches*win_points) and percentage_format
-- Drop the leading zero (from the string)
point_perc = string.sub(point_perc,2,string.len(point_perc))
|