Module:JI ratios: Difference between revisions

Ganaram inukshuk (talk | contribs)
m complement filtering now accounts for int limit
Ganaram inukshuk (talk | contribs)
m comments
Line 51: Line 51:
-- Are the ratios within the Tenney height?
-- Are the ratios within the Tenney height?
-- Has no effect (defaults to TRUE) if Tenney height is infinity.
local ratio_within_th = ratio_th <= tenney_height
local ratio_within_th = ratio_th <= tenney_height
local compl_within_th = compl_th <= tenney_height
local compl_within_th = compl_th <= tenney_height
Line 58: Line 59:
if complements_only then
if complements_only then
-- Only include ratios if its complement is also included.
if ratio_within_th and compl_within_th and compl_within_int_limit then
if ratio_within_th and compl_within_th and compl_within_int_limit then
table.insert(filtered_ratios, ratios[i])
table.insert(filtered_ratios, ratios[i])
end
end
else
else
-- Include ratios regardless of whether its complement is included.
if ratio_within_th then
if ratio_within_th then
table.insert(filtered_ratios, ratios[i])
table.insert(filtered_ratios, ratios[i])