Module:Weather box/row: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 481:
if mode == 'avg' or mode == 'sum' then
local p1, p2;
p1 = 0;
for i = 1, 12 do
val = values[i];
Line 486 ⟶ 488:
return nil;
end
p2 = math_mod._precision( val );
if p2 > p1 then
p1 = p2;
end
total = total + val;
end
if mode == 'avg' then
total = math_mod._round( total / 12, p1 + 1 );
end
return tostring( total ), total;