Module:Interval table: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
| Line 27: | Line 27: | ||
for j=1,max_nd do | for j=1,max_nd do | ||
t = i/gcd(i,j) .. "/" .. j/gcd(i,j) | t = i/gcd(i,j) .. "/" .. j/gcd(i,j) | ||
if (i/j) >= 1 and (i/j) <= max_size and not | if (i/j) >= 1 and (i/j) <= max_size and not table_contains(ratio_strings, t) then | ||
ratios[#ratios + 1] = {i/gcd(i,j),j/gcd(i,j)} | ratios[#ratios + 1] = {i/gcd(i,j),j/gcd(i,j)} | ||
ratio_strings[#ratio_strings + 1] = t | ratio_strings[#ratio_strings + 1] = t | ||