easings.QuadIn=function(c)c=c/1 return 1*math.pow(c,2)+0 end easings.QuadOut=function(c)c=c/1 return(-1*c)*(c-2)+0 end easings.QuadInOut=function(c)c=(c/1)*2 if c<1 then return.5*math.pow(c,2)+0 else return-0.5*((c-1)*(c-3)-1)+0 end end easings.QuadOutIn=function(c)if c<.5 then return easings.QuadOut(c*2,0,.5,1)else return easings.QuadIn(c*2-1,.5,.5,1)end end easings.CubicIn=function(c)c=c/1 return 1*math.pow(c,3)+0 end easings.CubicOut=function(c)c=c/1-1 return 1*(math.pow(c,3)+1)+0 end easings.CubicInOut=function(c)c=(c/1)*2 if c<1 then return((.5*c)*c)*c+0 else c=c-2 return.5*((c*c)*c+2)+0 end end easings.CubicOutIn=function(c)if c<.5 then return easings.CubicOut(c*2,0,.5,1)else return easings.CubicIn(c*2-1,.5,.5,1)end end easings.QuartIn=function(c)c=c/1 return 1*math.pow(c,4)+0 end easings.QuartOut=function(c)c=c/1-1 return-1*(math.pow(c,4)-1)+0 end easings.QuartInOut=function(c)c=(c/1)*2 if c<1 then return.5*math.pow(c,4)+0 else c=c-2 return-0.5*(math.pow(c,4)-2)+0 end end easings.QuartOutIn=function(c)if c<.5 then return easings.QuartOut(c*2,0,.5,1)else return easings.QuartIn(c*2-1,.5,.5,1)end end easings.QuintIn=function(c)c=c/1 return 1*math.pow(c,5)+0 end easings.QuintOut=function(c)c=c/1-1 return 1*(math.pow(c,5)+1)+0 end easings.QuintInOut=function(c)c=(c/1)*2 if c<1 then return.5*math.pow(c,5)+0 else c=c-2 return.5*(math.pow(c,5)+2)+0 end end easings.QuintOutIn=function(c)if c<.5 then return easings.QuintOut(c*2,0,.5,1)else return easings.QuintIn(c*2-1,.5,.5,1)end end easings.SineIn=function(c)return(-1*math.cos((c/1)*(math.pi/2))+1)+0 end easings.SineOut=function(c)return 1*math.sin((c/1)*(math.pi/2))+0 end easings.SineInOut=function(c)return-0.5*(math.cos((math.pi*c)/1)-1)+0 end easings.SineOutIn=function(c)if c<.5 then return easings.SineOut(c*2,0,.5,1)else return easings.SineIn(c*2-1,.5,.5,1)end end easings.ExpoIn=function(c)if c==0 then return 0 else return(1*math.pow(2,10*(c/1-1))+0)-.001 end end easings.ExpoOut=function(c)if c==1 then return 1 else return 1.001*(-math.pow(2,(-10*c)/1)+1)+0 end end easings.ExpoInOut=function(c)if c==0 then return 0 end if c==1 then return 1 end c=(c/1)*2 if c<1 then return(.5*math.pow(2,10*(c-1))+0)-.0005 else c=c-1 return.50025*(-math.pow(2,-10*c)+2)+0 end end easings.ExpoOutIn=function(c)if c<.5 then return easings.ExpoOut(c*2,0,.5,1)else return easings.ExpoIn(c*2-1,.5,.5,1)end end easings.CircIn=function(c)c=c/1 return-1*(math.sqrt(1-math.pow(c,2))-1)+0 end easings.CircOut=function(c)c=c/1-1 return 1*math.sqrt(1-math.pow(c,2))+0 end easings.CircInOut=function(c)c=(c/1)*2 if c<1 then return-0.5*(math.sqrt(1-c*c)-1)+0 else c=c-2 return.5*(math.sqrt(1-c*c)+1)+0 end end easings.CircOutIn=function(c)if c<.5 then return easings.CircOut(c*2,0,.5,1)else return easings.CircIn(c*2-1,.5,.5,1)end end easings.ElasticIn=function(c)if c==0 then return 0 end c=c/1 if c==1 then return 1 end if not p then p=.3 end local A if not a or a<math.abs(1)then a=1 A=p/4 else A=(p/(2*math.pi))*math.asin(1/a)end c=c-1 return-((a*math.pow(2,10*c))*math.sin(((c*1-A)*(2*math.pi))/p))+0 end easings.ElasticOut=function(c)if c==0 then return 0 end c=c/1 if c==1 then return 1 end if not p then p=.3 end local A if not a or a<math.abs(1)then a=1 A=p/4 else A=(p/(2*math.pi))*math.asin(1/a)end return((a*math.pow(2,-10*c))*math.sin(((c*1-A)*(2*math.pi))/p)+1)+0 end easings.ElasticInOut=function(c)if c==0 then return 0 end c=(c/1)*2 if c==2 then return 1 end if not p then p=.45 end if not a then a=0 end local A if not a or a<math.abs(1)then a=1 A=p/4 else A=(p/(2*math.pi))*math.asin(1/a)end if c<1 then c=c-1 return-0.5*((a*math.pow(2,10*c))*math.sin(((c*1-A)*(2*math.pi))/p))+0 else c=c-1 return(((a*math.pow(2,-10*c))*math.sin(((c*1-A)*(2*math.pi))/p))*.5+1)+0 end end easings.ElasticOutIn=function(c)if c<.5 then return easings.ElasticOut(c*2,0,.5,1,a,p)else return easings.ElasticIn(c*2-1,.5,.5,1,a,p)end end easings.BackIn=function(c)if not s then s=1.70158 end c=c/1 return((1*c)*c)*((s+1)*c-s)+0 end easings.BackOut=function(c)if not s then s=1.70158 end c=c/1-1 return 1*((c*c)*((s+1)*c+s)+1)+0 end easings.BackInOut=function(c)if not s then s=1.70158 end s=s*1.525 c=(c/1)*2 if c<1 then return.5*((c*c)*((s+1)*c-s))+0 else c=c-2 return.5*((c*c)*((s+1)*c+s)+2)+0 end end easings.BackOutIn=function(c)if c<.5 then return easings.BackOut(c*2,0,.5,1,s)else return easings.BackIn(c*2-1,.5,.5,1,s)end end easings.BounceOut=function(c)c=c/1 if c<.36363636363636 then return 1*((7.5625*c)*c)+0 elseif c<.72727272727273 then c=c-.54545454545455 return 1*((7.5625*c)*c+.75)+0 elseif c<.90909090909091 then c=c-.81818181818182 return 1*((7.5625*c)*c+.9375)+0 else c=c-.95454545454545 return 1*((7.5625*c)*c+.984375)+0 end end easings.BounceIn=function(c)return(1-easings.BounceOut(1-c,0,1,1))+0 end easings.BounceInOut=function(c)if c<.5 then return easings.BounceIn(c*2,0,1,1)*.5+0 else return(easings.BounceOut(c*2-1,0,1,1)*.5+.5)+0 end end easings.BounceOutIn=function(c)if c<.5 then return easings.BounceOut(c*2,0,.5,1)else return easings.BounceIn(c*2-1,.5,.5,1)end end
------------------------------------------------------------------------------------------------------------------------------------------------

easings.QuadIn = function(t)
	t = t / 1
	return 1 * math.pow(t, 2) + 0
end

easings.QuadOut = function(t)
	t = t / 1
	return -1 * t * (t - 2) + 0
end

easings.QuadInOut = function(t)
	t = t / 1 * 2
	if t < 1 then
		return 1 / 2 * math.pow(t, 2) + 0
	else
		return -1 / 2 * ((t - 1) * (t - 3) - 1) + 0
	end
end

easings.QuadOutIn = function(t)
	if t < 1 / 2 then
		return easings.QuadOut(t * 2, 0, 1 / 2, 1)
	else
		return easings.QuadIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1)
	end
end

easings.CubicIn = function(t)
	t = t / 1
	return 1 * math.pow(t, 3) + 0
end

easings.CubicOut = function(t)
	t = t / 1 - 1
	return 1 * (math.pow(t, 3) + 1) + 0
end

easings.CubicInOut = function(t)
	t = t / 1 * 2
	if t < 1 then
		return 1 / 2 * t * t * t + 0
	else
		t = t - 2
		return 1 / 2 * (t * t * t + 2) + 0
	end
end

easings.CubicOutIn = function(t)
	if t < 1 / 2 then
		return easings.CubicOut(t * 2, 0, 1 / 2, 1)
	else
		return easings.CubicIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1)
	end
end

easings.QuartIn = function(t)
	t = t / 1
	return 1 * math.pow(t, 4) + 0
end

easings.QuartOut = function(t)
	t = t / 1 - 1
	return -1 * (math.pow(t, 4) - 1) + 0
end

easings.QuartInOut = function(t)
	t = t / 1 * 2
	if t < 1 then
		return 1 / 2 * math.pow(t, 4) + 0
	else
		t = t - 2
		return -1 / 2 * (math.pow(t, 4) - 2) + 0
	end
end

easings.QuartOutIn = function(t)
	if t < 1 / 2 then
		return easings.QuartOut(t * 2, 0, 1 / 2, 1)
	else
		return easings.QuartIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1)
	end
end

easings.QuintIn = function(t)
	t = t / 1
	return 1 * math.pow(t, 5) + 0
end

easings.QuintOut = function(t)
	t = t / 1 - 1
	return 1 * (math.pow(t, 5) + 1) + 0
end

easings.QuintInOut = function(t)
	t = t / 1 * 2
	if t < 1 then
		return 1 / 2 * math.pow(t, 5) + 0
	else
		t = t - 2
		return 1 / 2 * (math.pow(t, 5) + 2) + 0
	end
end

easings.QuintOutIn = function(t)
	if t < 1 / 2 then
		return easings.QuintOut(t * 2, 0, 1 / 2, 1)
	else
		return easings.QuintIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1)
	end
end

easings.SineIn = function(t)
	return -1 * math.cos(t / 1 * (math.pi / 2)) + 1 + 0
end

easings.SineOut = function(t)
	return 1 * math.sin(t / 1 * (math.pi / 2)) + 0
end

easings.SineInOut = function(t)
	return -1 / 2 * (math.cos(math.pi * t / 1) - 1) + 0
end

easings.SineOutIn = function(t)
	if t < 1 / 2 then
		return easings.SineOut(t * 2, 0, 1 / 2, 1)
	else
		return easings.SineIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1)
	end
end

easings.ExpoIn = function(t)
	if t == 0 then
		return 0
	else
		return 1 * math.pow(2, 10 * (t / 1 - 1)) + 0 - 1 * 0.001
	end
end

easings.ExpoOut = function(t)
	if t == 1 then
		return 0 + 1
	else
		return 1 * 1.001 * (-math.pow(2, -10 * t / 1) + 1) + 0
	end
end

easings.ExpoInOut = function(t)
	if t == 0 then
		return 0
	end
	if t == 1 then
		return 0 + 1
	end
	t = t / 1 * 2
	if t < 1 then
		return 1 / 2 * math.pow(2, 10 * (t - 1)) + 0 - 1 * 0.0005
	else
		t = t - 1
		return 1 / 2 * 1.0005 * (-math.pow(2, -10 * t) + 2) + 0
	end
end

easings.ExpoOutIn = function(t)
	if t < 1 / 2 then
		return easings.ExpoOut(t * 2, 0, 1 / 2, 1)
	else
		return easings.ExpoIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1)
	end
end

easings.CircIn = function(t)
	t = t / 1
	return (-1 * (math.sqrt(1 - math.pow(t, 2)) - 1) + 0)
end

easings.CircOut = function(t)
	t = t / 1 - 1
	return (1 * math.sqrt(1 - math.pow(t, 2)) + 0)
end

easings.CircInOut = function(t)
	t = t / 1 * 2
	if t < 1 then
		return -1 / 2 * (math.sqrt(1 - t * t) - 1) + 0
	else
		t = t - 2
		return 1 / 2 * (math.sqrt(1 - t * t) + 1) + 0
	end
end

easings.CircOutIn = function(t)
	if t < 1 / 2 then
		return easings.CircOut(t * 2, 0, 1 / 2, 1)
	else
		return easings.CircIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1)
	end
end

easings.ElasticIn = function(t)
	if t == 0 then
		return 0
	end

	t = t / 1
	if t == 1 then
		return 0 + 1
	end

	if not p then
		p = 1 * 0.3
	end

	local s
	if not a or a < math.abs(1) then
		a = 1
		s = p / 4
	else
		s = p / (2 * math.pi) * math.asin(1 / a)
	end

	t = t - 1

	return -(a * math.pow(2, 10 * t) * math.sin((t * 1 - s) * (2 * math.pi) / p)) + 0
end

easings.ElasticOut = function(t)
	if t == 0 then
		return 0
	end

	t = t / 1
	if t == 1 then
		return 0 + 1
	end

	if not p then
		p = 1 * 0.3
	end

	local s
	if not a or a < math.abs(1) then
		a = 1
		s = p / 4
	else
		s = p / (2 * math.pi) * math.asin(1 / a)
	end

	return a * math.pow(2, -10 * t) * math.sin((t * 1 - s) * (2 * math.pi) / p) + 1 + 0
end

easings.ElasticInOut = function(t)
	if t == 0 then
		return 0
	end

	t = t / 1 * 2
	if t == 2 then
		return 0 + 1
	end

	if not p then
		p = 1 * (0.3 * 1.5)
	end
	if not a then
		a = 0
	end

	local s
	if not a or a < math.abs(1) then
		a = 1
		s = p / 4
	else
		s = p / (2 * math.pi) * math.asin(1 / a)
	end

	if t < 1 then
		t = t - 1
		return -0.5 * (a * math.pow(2, 10 * t) * math.sin((t * 1 - s) * (2 * math.pi) / p)) + 0
	else
		t = t - 1
		return a * math.pow(2, -10 * t) * math.sin((t * 1 - s) * (2 * math.pi) / p) * 0.5 + 1 + 0
	end
end

easings.ElasticOutIn = function(t)
	if t < 1 / 2 then
		return easings.ElasticOut(t * 2, 0, 1 / 2, 1, a, p)
	else
		return easings.ElasticIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1, a, p)
	end
end

easings.BackIn = function(t)
	if not s then
		s = 1.70158
	end
	t = t / 1
	return 1 * t * t * ((s + 1) * t - s) + 0
end

easings.BackOut = function(t)
	if not s then
		s = 1.70158
	end
	t = t / 1 - 1
	return 1 * (t * t * ((s + 1) * t + s) + 1) + 0
end

easings.BackInOut = function(t)
	if not s then
		s = 1.70158
	end
	s = s * 1.525
	t = t / 1 * 2
	if t < 1 then
		return 1 / 2 * (t * t * ((s + 1) * t - s)) + 0
	else
		t = t - 2
		return 1 / 2 * (t * t * ((s + 1) * t + s) + 2) + 0
	end
end

easings.BackOutIn = function(t)
	if t < 1 / 2 then
		return easings.BackOut(t * 2, 0, 1 / 2, 1, s)
	else
		return easings.BackIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1, s)
	end
end

easings.BounceOut = function(t)
	t = t / 1
	if t < 1 / 2.75 then
		return 1 * (7.5625 * t * t) + 0
	elseif t < 2 / 2.75 then
		t = t - (1.5 / 2.75)
		return 1 * (7.5625 * t * t + 0.75) + 0
	elseif t < 2.5 / 2.75 then
		t = t - (2.25 / 2.75)
		return 1 * (7.5625 * t * t + 0.9375) + 0
	else
		t = t - (2.625 / 2.75)
		return 1 * (7.5625 * t * t + 0.984375) + 0
	end
end

easings.BounceIn = function(t)
	return 1 - easings.BounceOut(1 - t, 0, 1, 1) + 0
end

easings.BounceInOut = function(t)
	if t < 1 / 2 then
		return easings.BounceIn(t * 2, 0, 1, 1) * 0.5 + 0
	else
		return easings.BounceOut(t * 2 - 1, 0, 1, 1) * 0.5 + 1 * 0.5 + 0
	end
end

easings.BounceOutIn = function(t)
	if t < 1 / 2 then
		return easings.BounceOut(t * 2, 0, 1 / 2, 1)
	else
		return easings.BounceIn((t * 2) - 1, 0 + 1 / 2, 1 / 2, 1)
	end
end
