Module:Interval table: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
| Line 11: | Line 11: | ||
for i=1,max_nd do | for i=1,max_nd do | ||
for j=1,max_nd do | for j=1,max_nd do | ||
if i/j >= 1 and i/j <= max_size then | if (i/j) >= 1 and (i/j) <= max_size then | ||
ratios[#ratios + 1] = {i,j} | ratios[#ratios + 1] = {i,j} | ||
end | end | ||
| 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 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^(1/1200))) <= (400 / et.size) then | |||
-- wikitext = wikitext .. '[[' .. n .. '/' .. d .. ']]' .. ' ' | |||
-- end | |||
-- wikitext = wikitext .. '\n' | |||
end | -- end | ||
end | end | ||