port easeInOutQuad

This commit is contained in:
MaZderMind 2014-11-05 12:24:34 +01:00
parent a156e318a8
commit 5cbaeea453

View file

@ -38,6 +38,13 @@ def easeOutQuad(t, b, c, d):
t=float(t)/d t=float(t)/d
return -c *(t)*(t-2) + b; return -c *(t)*(t-2) + b;
def easeInOutQuad(t, b, c, d):
t=float(t)/(d/2)
if (t < 1):
return c/2*t*t + b;
t=t-1
return -c/2 * (t*(t-2) - 1) + b;
def easeLinear(t, b, c, d): def easeLinear(t, b, c, d):
t=float(t)/d t=float(t)/d
return t*c+b return t*c+b