Module:Mediants: Difference between revisions
Removed tenney height search (for now); comments/todo |
No edit summary |
||
| Line 143: | Line 143: | ||
-- whose numerator or denominator exceeds the int limit. This is made a stand- | -- whose numerator or denominator exceeds the int limit. This is made a stand- | ||
-- alone function under the reasoning that it's a common enough operation. | -- alone function under the reasoning that it's a common enough operation. | ||
function p.find_mediants_by_int_limit(init_ratios, int_limit) | |||
local init_ratios = init_ratios or {{1,1}, {1,0}} | |||
local int_limit = int_limit or 50 | |||
local ratios, depths | |||
ratios, depths = p.find_mediants_by_search_func(init_ratios, p.int_limit_search, int_limit) | |||
return ratios, depths | |||
end | |||
function p.find_only_mediants_by_int_limit(init_ratios, int_limit) | |||
local init_ratios = init_ratios or {{1,1}, {1,0}} | |||
local int_limit = int_limit or 50 | |||
local ratios, depths | |||
ratios, depths = p.find_mediants_by_search_func(init_ratios, p.int_limit_search, int_limit) | |||
return ratios | |||
end | |||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
| Line 149: | Line 169: | ||
function p.tester() | function p.tester() | ||
return | return p.find_only_mediants_by_int_limit({{1,1},{3,1}}) | ||
end | end | ||
return p | return p | ||