Module:Infobox interval: Difference between revisions
buggy, reverting |
2nd try |
||
| Line 172: | Line 172: | ||
end | end | ||
if regular then | if regular then | ||
-- it's really hard to hear a tenth of a cent, but 3 sig figs seems possibly useful | |||
local sigFigs = 3 | |||
if cents >= 1000 then sigFigs = 4 end | |||
if cents >= 10000 then sigFigs = 5 end | |||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
"Size in [[cent]]s", | "Size in [[cent]]s", | ||
utils._round(cents, | utils._round(cents, sigFigs) .. "¢", | ||
}) | }) | ||
end | end | ||