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 .. '|' | |||
for j=1,#ratios_list do | |||
local n = ratios_list[j][1] | |||
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) | |||
if math.abs(ET.cents(et, i) - (math.log(n/d)/math.log(2)) * 1200) <= (400 / et.size) then | |||
wikitext = wikitext .. '[[' .. n .. '/' .. d .. ']]' .. ' ' | |||
end | |||
wikitext = wikitext .. '\n' | |||
end | |||
end | end | ||