Module:Interval table: Difference between revisions

CompactStar (talk | contribs)
No edit summary
CompactStar (talk | contribs)
No edit summary
Line 64: Line 64:
end
end
end
end
-- wikitext = wikitext .. '|'
wikitext = wikitext .. '|'
-- for j=1,#ratios_list do
for j=1,#ratios_list do
-- local n = ratios_list[j][1]
local n = ratios_list[j][1]
-- local d = ratios_list[j][2]
local d = ratios_list[j][2]
-- -- In approximate ratios column, show all ratios in the list that are within 1/3 of ET size (33.3 relative cents)
-- In approximate ratios column, show all ratios in the list that are within 1/3 of ET size (33.3 relative cents)
-- if math.abs(ET.cents(et, i) - math.log(n * d)/math.log(2^(1/1200))) <= (400 / et.size) then
if math.abs(ET.cents(et, i) - (math.log(n/d)/math.log(2)) * 1200) <= (400 / et.size) then
-- wikitext = wikitext .. '[[' .. n .. '/' .. d .. ']]' .. ' '
wikitext = wikitext .. '[[' .. n .. '/' .. d .. ']]' .. ' '
-- end
end
-- wikitext = wikitext .. '\n'
wikitext = wikitext .. '\n'
-- end
end
end
end