local function t(t,i,o,x,P,Y)x,P,Y=default(x,P,Y)x,P,Y=default(x,P,Y)if t<Y/2 then return outElastic(t*2,x,P/2,Y,i,o)else return inElastic(t*2-Y,x+P/2,P/2,Y,i,o)end end local function i(t,i,o,x,P)o,x,P=default(o,x,P)if not i then i=1.70158 end t=t/P return((x*t)*t)*((i+1)*t-i)+o end local function o(t,i,o,x,P)i,o,x=default(i,o,x)if not P then P=1.70158 end t=t/x-1 return o*((t*t)*((P+1)*t+P)+1)+i end local function x(t,i,o,x,P)o,x,P=default(o,x,P)if not i then i=1.70158 end i=i*1.525 t=(t/P)*2 if t<1 then return(x/2)*((t*t)*((i+1)*t-i))+o else t=t-2 return(x/2)*((t*t)*((i+1)*t+i)+2)+o end end local function P(t,x,P,Y,U)P,Y,U=default(P,Y,U)if t<U/2 then return o(t*2,P,Y/2,U,x)else return i(t*2-U,P+Y/2,Y/2,U,x)end end local function Y(t,i,o,x)i,o,x=default(i,o,x)t=t/x if t<.36363636363636 then return o*((7.5625*t)*t)+i elseif t<.72727272727273 then t=t-.54545454545455 return o*((7.5625*t)*t+.75)+i elseif t<.90909090909091 then t=t-.81818181818182 return o*((7.5625*t)*t+.9375)+i else t=t-.95454545454545 return o*((7.5625*t)*t+.984375)+i end end local function U(t,i,o,x)i,o,x=default(i,o,x)return(o-Y(x-t,0,o,x))+i end local function l(t,i,o,x)i,o,x=default(i,o,x)if t<x/2 then return U(t*2,0,o,x)*.5+i else return(Y(t*2-x,0,o,x)*.5+o*.5)+i end end local function Z(t,i,o,x)i,o,x=default(i,o,x)if t<x/2 then return Y(t*2,i,o/2,x)else return U(t*2-x,i+o/2,o/2,x)end end module={Linear=linear;InQuad=inQuad,OutQuad=outQuad,InOutQuad=inOutQuad,OutInQuad=outInQuad,InCubic=inCubic;OutCubic=outCubic,InOutCubic=inOutCubic,OutInCubic=outInCubic;InQuart=inQuart,OutQuart=outQuart;InOutQuart=inOutQuart,OutInQuart=outInQuart,InQuint=inQuint,OutQuint=outQuint;InOutQuint=inOutQuint,OutInQuint=outInQuint;InSine=inSine;OutSine=outSine;InOutSine=inOutSine;OutInSine=outInSine,InExpo=inExpo;OutExpo=outExpo;InOutExpo=inOutExpo;OutInExpo=outInExpo;InCirc=inCirc,OutCirc=outCirc,InOutCirc=inOutCirc;OutInCirc=outInCirc;InElastic=inElastic;OutElastic=outElastic;InOutElastic=inOutElastic,OutInElastic=t,InBack=i,OutBack=o;InOutBack=x,OutInBack=P,InBounce=U;OutBounce=Y,InOutBounce=l;OutInBounce=Z}return module

local function outInElastic(t,a,p, b, c, d)
  b,c,d = default(b,c,d)
   b,c,d = default(b,c,d)
  if t < d / 2 then
    return outElastic(t * 2, b, c / 2, d, a, p)
  else
    return inElastic((t * 2) - d, b + c / 2, c / 2, d, a, p)
  end
end

local function inBack(t, s,b, c, d)
  b,c,d = default(b,c,d)

  
	if not s then s = 1.70158 end
  t = t / d
  return c * t * t * ((s + 1) * t - s) + b
end

local function outBack(t, b, c, d, s)
  b,c,d = default(b,c,d)

  
	if not s then s = 1.70158 end
  t = t / d - 1
  return c * (t * t * ((s + 1) * t + s) + 1) + b
end

local function inOutBack(t,s, b, c, d)
  b,c,d = default(b,c,d)

  
	if not s then s = 1.70158 end
  s = s * 1.525
  t = t / d * 2
  if t < 1 then
    return c / 2 * (t * t * ((s + 1) * t - s)) + b
  else
    t = t - 2
    return c / 2 * (t * t * ((s + 1) * t + s) + 2) + b
  end
end

local function outInBack(t,s, b, c, d)
  b,c,d = default(b,c,d)

  
	if t < d / 2 then
    return outBack(t * 2, b, c / 2, d, s)
  else
    return inBack((t * 2) - d, b + c / 2, c / 2, d, s)
  end
end

local function outBounce(t, b, c, d)
  b,c,d = default(b,c,d)

  
	t = t / d
  if t < 1 / 2.75 then
    return c * (7.5625 * t * t) + b
  elseif t < 2 / 2.75 then
    t = t - (1.5 / 2.75)
    return c * (7.5625 * t * t + 0.75) + b
  elseif t < 2.5 / 2.75 then
    t = t - (2.25 / 2.75)
    return c * (7.5625 * t * t + 0.9375) + b
  else
    t = t - (2.625 / 2.75)
    return c * (7.5625 * t * t + 0.984375) + b
  end
end

local function inBounce(t, b, c, d)

    b,c,d = default(b,c,d)

	return c - outBounce(d - t, 0, c, d) + b
end

local function inOutBounce(t, b, c, d)
  b,c,d = default(b,c,d)

 
	 if t < d / 2 then
    return inBounce(t * 2, 0, c, d) * 0.5 + b
  else
    return outBounce(t * 2 - d, 0, c, d) * 0.5 + c * .5 + b
  end
end

local function outInBounce(t, b, c, d)
	
  b,c,d = default(b,c,d)
	
  if t < d / 2 then
    return outBounce(t * 2, b, c / 2, d)
  else
    return inBounce((t * 2) - d, b + c / 2, c / 2, d)
  end
end

module = {
  Linear = linear,
  InQuad = inQuad,
  OutQuad = outQuad,
  InOutQuad = inOutQuad,
  OutInQuad = outInQuad,
  InCubic  = inCubic ,
  OutCubic = outCubic,
  InOutCubic = inOutCubic,
  OutInCubic = outInCubic,
  InQuart = inQuart,
  OutQuart = outQuart,
  InOutQuart = inOutQuart,
  OutInQuart = outInQuart,
  InQuint = inQuint,
  OutQuint = outQuint,
  InOutQuint = inOutQuint,
  OutInQuint = outInQuint,
  InSine = inSine,
  OutSine = outSine,
  InOutSine = inOutSine,
  OutInSine = outInSine,
  InExpo = inExpo,
  OutExpo = outExpo,
  InOutExpo = inOutExpo,
  OutInExpo = outInExpo,
  InCirc = inCirc,
  OutCirc = outCirc,
  InOutCirc = inOutCirc,
  OutInCirc = outInCirc,
  InElastic = inElastic,
  OutElastic = outElastic,
  InOutElastic = inOutElastic,
  OutInElastic = outInElastic,
  InBack = inBack,
  OutBack = outBack,
  InOutBack = inOutBack,
  OutInBack = outInBack,
  InBounce = inBounce,
  OutBounce = outBounce,
  InOutBounce = inOutBounce,
  OutInBounce = outInBounce,
}
return module
