Module:Interval extension: Difference between revisions

R-4981 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 1: Line 1:
local p = {}
-- Calculated by http://www.mikebattagliamusic.com/HE-JS/HE.html.
-- Calculated by http://www.mikebattagliamusic.com/HE-JS/HE.html.
-- Note: that the unit is Nat, not Bit.
-- Note: that the unit is Nat, not Bit.
local p = {}


local lookup_table = {
local lookup_table = {
Line 16: Line 16:


     b = c - math.floor(c)
     b = c - math.floor(c)
     return lookup_table[math.floor(c)] * (1-b) + lookup_table[math.floor(c) + 1] * b
     return lookup_table[math.floor(c)] * (1 - b) + lookup_table[math.floor(c) + 1] * b
end
end


return p
return p