Module:Infobox MOS: Difference between revisions
Drop use of ET template, as ET-to-string functions are now in Module:MOS |
bugfix root (nL ns) mosses displaying degenerate (nL 0s) mosses as related mosses |
||
| Line 280: | Line 280: | ||
-- a larger array. | -- a larger array. | ||
function p.related_scales(input_mos) | function p.related_scales(input_mos) | ||
local input_mos = input_mos or mos.new(5, | local input_mos = input_mos or mos.new(5, 5) | ||
local parent_mos = mos.new(math.min(input_mos.nL, input_mos.ns), math.abs(input_mos.nL-input_mos.ns), input_mos.equave) | local parent_mos = mos.new(math.min(input_mos.nL, input_mos.ns), math.abs(input_mos.nL-input_mos.ns), input_mos.equave) | ||
| Line 298: | Line 298: | ||
local hard_floght_scalesig = string.format("[[%s|%s]]", mos.as_long_string(hard_floght_mos), mos.as_string(hard_floght_mos)) | local hard_floght_scalesig = string.format("[[%s|%s]]", mos.as_long_string(hard_floght_mos), mos.as_string(hard_floght_mos)) | ||
local number_of_periods = mos. | local number_of_periods = mos.period_count(input_mos) | ||
local is_nL_ns = input_mos.nL == number_of_periods and input_mos.ns == number_of_periods | local is_nL_ns = input_mos.nL == number_of_periods and input_mos.ns == number_of_periods | ||
if is_nL_ns then | if is_nL_ns then | ||