Module:JI ratio finder: Difference between revisions

Ganaram inukshuk (talk | contribs)
Removed odd-limit function, as it's now part of Module:Rational
Ganaram inukshuk (talk | contribs)
Added ratios-to-text
Line 59: Line 59:
end
end


function p.ratios_to_text(ratios)
local ratios = ratios or { rat.new(5, 4), rat.new (81, 64) }
local text = ""
for i = 1, #ratios do
text = text .. rat.as_ratio(ratios[i])
if i ~= #ratios then
text = text .. ", "
end
end
return text
end




return p
return p