port easeInOutQuad
This commit is contained in:
parent
a156e318a8
commit
5cbaeea453
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue