diff --git a/scripts/common/easing.lua b/scripts/common/easing.lua index 11717b2..f02b327 100644 --- a/scripts/common/easing.lua +++ b/scripts/common/easing.lua @@ -41,16 +41,25 @@ local function linear(t, b, c, d) end local function inQuad(t, b, c, d) + b = b or 0 + c = c or 1 + d = d or 1 t = t / d return c * (t ^ 2) + b end local function outQuad(t, b, c, d) + b = b or 0 + c = c or 1 + d = d or 1 t = t / d return -c * t * (t - 2) + b end local function inOutQuad(t, b, c, d) + b = b or 0 + c = c or 1 + d = d or 1 t = t / d * 2 if t < 1 then return c / 2 * (t ^ 2) + b @@ -60,6 +69,9 @@ local function inOutQuad(t, b, c, d) end local function outInQuad(t, b, c, d) + b = b or 0 + c = c or 1 + d = d or 1 if t < d / 2 then return outQuad (t * 2, b, c / 2, d) else