Module:MOS in EDO allperiods: Difference between revisions

Ganaram inukshuk (talk | contribs)
Added max period count; default is 15
Ganaram inukshuk (talk | contribs)
m Making sure n-period mosses for 2n-edo never show
Line 108: Line 108:
-- Process max number of periods
-- Process max number of periods
-- If -1 was entered, then the maximum is 1 + math.floor(edo / 2), the default max
-- If -1 was entered, then the maximum is math.floor(edo / 2) - 1, the default max
-- Otherwise, make sure that value doesn't exceed the default max
-- Otherwise, make sure that value doesn't exceed the default max
local default_max = 1 + math.floor(edo / 2)
local default_max = math.floor(edo / 2) - 1
if max_number_of_periods == -1 then
if max_number_of_periods == -1 then
max_number_of_periods = default_max
max_number_of_periods = default_max