Module:Interval table: Difference between revisions
Trying to make the inclusion of ratios by edo size more granular. If this breaks anything I will immediately undo. |
Undo revision 157302 by BudjarnLambeth (talk) Broke something Tag: Undo |
||
| Line 129: | Line 129: | ||
for j = 1, #ratios_list do | for j = 1, #ratios_list do | ||
-- Go through all ratios. | -- Go through all ratios. | ||
-- If they are mapped to the current step in the ET's patent val | -- If they are mapped to the current step in the ET's patent val and < 1/3 edostep error, | ||
-- add to approximate ratios column. | -- add to approximate ratios column. | ||
local t = mapping(rat.new(ratios_list[j][1], ratios_list[j][2]), patent_val) | local t = mapping(rat.new(ratios_list[j][1], ratios_list[j][2]), patent_val) | ||
if | if | ||
t == i | t == i | ||
and math.abs(ET.cents(et, i) - utils._log(ratios_list[j][1] / ratios_list[j][2], 2) * 1200) | and math.abs(ET.cents(et, i) - utils._log(ratios_list[j][1] / ratios_list[j][2], 2) * 1200) | ||
< (1200 / (3 * et.size)) | < (1200 / (3 * et.size)) | ||
then | then | ||
wikitext = wikitext .. "[[" .. ratios_list[j][1] .. "/" .. ratios_list[j][2] .. "]], " | wikitext = wikitext .. "[[" .. ratios_list[j][1] .. "/" .. ratios_list[j][2] .. "]], " | ||
| Line 179: | Line 170: | ||
return p | return p | ||