Module:Infobox AFDO: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
| Line 2: | Line 2: | ||
local u = require('Module:Utils') | local u = require('Module:Utils') | ||
local infobox = require('Module:Infobox') | local infobox = require('Module:Infobox') | ||
function p.infobox_AFDO(frame) | function p.infobox_AFDO(frame) | ||
local steps = frame.args['steps'] | local steps = frame.args['steps'] | ||
| Line 13: | Line 15: | ||
u._prime_factorization(stepnum) | u._prime_factorization(stepnum) | ||
}) | }) | ||
table.insert(infobox_data, { | |||
'Fifth', | |||
fifth .. '/' .. steps .. '(' .. math.floor(math.log2(fifth/steps) * 1200 * 1000)/1000 .. 'c)' | |||
}) | |||
if(dualfifth) then | |||
table.insert(infobox_data, { | |||
'Dual sharp fifth', | |||
fifth .. '/' .. steps .. '(' .. math.floor(math.log2(fifth) * 1200 * 1000)/1000 .. 'c)' | |||
}) | |||
table.insert(infobox_data, { | |||
'Dual flat fifth', | |||
(fifth-1) .. '/' .. steps .. '(' .. math.floor(math.log2((fifth-1)/steps) * 1200 * 1000)/1000 .. 'c)' | |||
}) | |||
end | |||
local result = infobox.build( | local result = infobox.build( | ||