local function x(x,g,u,e,Y,v)if x==0 then return g end x=x/e if x==1 then return g+u end if not v then v=e*.3 end local R if not Y or Y<abs(u)then Y=u R=v/4 else R=(v/(2*pi))*asin(u/Y)end return((Y*pow(2,-10*x))*sin(((x*e-R)*(2*pi))/v)+u)+g end

local function outElastic(t, b, c, d, a, p)
	if t == 0 then return b end

	t = t / d

	if t == 1 then return b + c end

	if not p then p = d * 0.3 end

	local s

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

	return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b
end
