Module:Infobox ET: Difference between revisions
Using a proper rational representation for equaves |
Consistency limits added |
||
Line 3: | Line 3: | ||
local u = require('Module:Utils') | local u = require('Module:Utils') | ||
local rat = require('Module:Rational') | local rat = require('Module:Rational') | ||
local l = require('Module:Limits') | |||
function p.infobox_ET(frame) | function p.infobox_ET(frame) | ||
Line 37: | Line 38: | ||
'| style="text-align:right; padding-right: 0.25em" | Fifth\n' .. | '| style="text-align:right; padding-right: 0.25em" | Fifth\n' .. | ||
'| style="background-color: white; padding-left: 0.25em; font-weight: bold" | ' .. string.format("%d", fifth) .. '\\' .. tuning .. ' (' .. i._to_cents(i._backslash_ratio(fifth .. '\\' .. tuning), 6) .. '¢)\n' .. | '| style="background-color: white; padding-left: 0.25em; font-weight: bold" | ' .. string.format("%d", fifth) .. '\\' .. tuning .. ' (' .. i._to_cents(i._backslash_ratio(fifth .. '\\' .. tuning), 6) .. '¢)\n' .. | ||
'|-\n' .. | |||
'| style="text-align:right; padding-right: 0.25em" | Consistency limit\n' .. | |||
'| style="background-color: white; padding-left: 0.25em; font-weight: bold" | ' .. l.consistency_limit(size, equave) .. '\n' .. | |||
'|-\n' .. | |||
'| style="text-align:right; padding-right: 0.25em" | Distinct consistency limit\n' .. | |||
'| style="background-color: white; padding-left: 0.25em; font-weight: bold" | ' .. l.consistency_limit(size, equave, true) .. '\n' .. | |||
'|}</div>' | '|}</div>' | ||
end | end | ||
return p | return p |