Module:MOS modes: Difference between revisions

Ganaram inukshuk (talk | contribs)
Inputs entered as a semicolon-delimited string are now trimmed of leading and trailing whitespace
Sintel (talk | contribs)
really now, how many mos modules are there
Line 1: Line 1:
local mos = require('Module:MOS')
local mos = require('Module:MOS')
local rat = require('Module:Rational')
local rat = require('Module:Rational')
local utils = require('Module:Utils')
local p = {}
local p = {}


Line 12: Line 13:
local nL = input_mos.nL
local nL = input_mos.nL
local ns = input_mos.ns
local ns = input_mos.ns
local periods = rat.gcd(nL, ns)
local periods = utils._gcd(nL, ns)
-- Find its brightest mode as a string of L's and s's
-- Find its brightest mode as a string of L's and s's
Line 78: Line 79:
-- Get the mos's modes and the mode count
-- Get the mos's modes and the mode count
local mos_modes = p.modes_by_brightness(input_mos)
local mos_modes = p.modes_by_brightness(input_mos)
local periods = rat.gcd(input_mos.nL, input_mos.ns) -- Needed for UDP
local periods = utils._gcd(input_mos.nL, input_mos.ns) -- Needed for UDP


-- This is for entering multiple columns of info, if a single column of mode names isn't enough
-- This is for entering multiple columns of info, if a single column of mode names isn't enough