Module:Infobox interval: Difference between revisions

Plumtree (talk | contribs)
mNo edit summary
Plumtree (talk | contribs)
mNo edit summary
Line 95: Line 95:
local comma = nil
local comma = nil
if regular and cents > 0 then
if regular and cents > 0 then
if cents <= 3.5 then
if rational and rat.is_power(ratio) then
-- rational powers are not considered commas
elseif cents <= 3.5 then
comma = '[[Unnoticeable comma|unnoticeable]]'
comma = '[[Unnoticeable comma|unnoticeable]]'
cats = cats .. '[[Category:Unnoticeable commas]]'
elseif cents <= 30 then
elseif cents <= 30 then
comma = '[[Small comma|small]]'
comma = '[[Small comma|small]]'
cats = cats .. '[[Category:Small commas]]'
elseif cents <= 100 then
elseif cents <= 100 then
comma = '[[Medium comma|medium]]'
comma = '[[Medium comma|medium]]'
cats = cats .. '[[Category:Medium commas]]'
elseif cents <= 250 then
elseif cents <= 250 then
comma = '[[Large comma|large]]'
comma = '[[Large comma|large]]'
end
cats = cats .. '[[Category:Large commas]]'
-- rational powers are not considered commas
if rational and rat.is_power(ratio) then
comma = nil
end
end
end
end