Module:Infobox chord: Difference between revisions
No edit summary |
No edit summary |
||
Line 26: | Line 26: | ||
end | end | ||
end | end | ||
local root = | local root = harmonics[0] | ||
if root == nil and errors == "" then | if root == nil and errors == "" then | ||
errors = errors .. "<p>error: no harmonics found</p>" | errors = errors .. "<p>error: no harmonics found</p>" | ||
Line 44: | Line 44: | ||
end | end | ||
local numer = h / utils.gcd(h, | local numer = h / utils.gcd(h, root) | ||
local odd = numer | local odd = numer | ||
while odd % 2 == 0 do | while odd % 2 == 0 do |