Module:Harmonics in edo: Difference between revisions

Inthar (talk | contribs)
mNo edit summary
Inthar (talk | contribs)
use both unreduced and reduced steps
Line 7: Line 7:
   local tabs = {'! rowspan="2" | Error \n! absolute ([[cent|¢]]) '}
   local tabs = {'! rowspan="2" | Error \n! absolute ([[cent|¢]]) '}
   local trel = {'! [[Relative error|relative]] (%) '}
   local trel = {'! [[Relative error|relative]] (%) '}
   local tdeg = {'! colspan="2" | Steps'}
   local tdeg = {'! colspan="2" | Steps ([[octave reduction|reduced]])'}
   local fmt_approx = string.format(' %%.%df', prec)
   local fmt_approx = string.format(' %%.%df', prec)
   local fmt_abs = string.format(' %%+.%df', prec)
   local fmt_abs = string.format(' %%+.%df', prec)
Line 19: Line 19:
     table.insert(tabs, string.format(fmt_abs, 1200 * (ev - v ) / edo))
     table.insert(tabs, string.format(fmt_abs, 1200 * (ev - v ) / edo))
     table.insert(trel, string.format(fmt_rel, 100 * (ev - v)))
     table.insert(trel, string.format(fmt_rel, 100 * (ev - v)))
     table.insert(tdeg, ' ' .. ev % edo .. ' ')
     table.insert(tdeg, ' ' .. ev .. ' ('.. ev % edo .. ')')
   end
   end
   local titleMarkup = ''
   local titleMarkup = ''