Module:Sports table/Badminton team: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 185:
end
local pcomp
-- Whether to use goal ratio (goal average) or goal percentage instead
local use_ratio_val = Args['use_goal_ratio'] or 'no'
local use_percentage_val = Args['use_goal_percentage'] or 'no'
local skip_sign
if yesno(use_ratio_val) then
-- Now it is the goal ratio/goal average
if paig == 0 then
pcomp = '—'
else
pcomp = mm._precision_format(gfor / gaig, 3)
end
elseif yesno(use_percentage_val) then
-- Now it is the percentage
if paig == 0 then
pcomp = '—'
else
pcomp = mm._precision_format(100 * gfor / gaig , 1)
end
else
-- It's match difference
pcomp = pfor - paig
-- Formatting with signs
if pcomp>0 then
pcomp='+'..pcomp
elseif pcomp < 0 then
pcomp='&minus;'..-pcomp
end
end
-- Some local vars
local hth_string