function Interpolate.Linear(l,d,Z)Z=math.clamp(Z,0,1)return(1-Z)*l+Z*d end function Interpolate.QuadInOut(l)return l<.5 and(2*l)*l or 1-math.pow(-2*l+2,2)/2 end function Interpolate.Bezier(l,d,Z,z)return((1-z)^2*l+((2*(1-z))*z)*d)+z^2*Z end return Interpolate

function Interpolate.Linear(p0, p1, t)
	t = math.clamp(t, 0, 1)
	return (1-t)*p0 + t*p1
end

function Interpolate.QuadInOut(t)
	return t < 0.5 and 2 * t * t or 1 - math.pow(-2 * t + 2, 2) / 2
end

function Interpolate.Bezier(p0, p1, p2, t)
	return (1 - t)^2 * p0 + 2 * (1 - t) * t * p1 + t^2 * p2
end

return Interpolate
