Module:Infobox ET: Difference between revisions
m Including 0ed<...> for links |
mNo edit summary |
||
Line 7: | Line 7: | ||
-- towards is one of: -1 (floor), 0 (nearest), 1 (ceil) | -- towards is one of: -1 (floor), 0 (nearest), 1 (ceil) | ||
local function approximate(size, equave, interval, towards) | local function approximate(size, equave, interval, towards) | ||
if size == 0 then | |||
return 0 | |||
end | |||
towards = towards or 0 | towards = towards or 0 | ||
local exact = math.log(interval) / math.log(rat.as_float(equave)) * size | local exact = math.log(interval) / math.log(rat.as_float(equave)) * size |