From 5cbaeea4536ab2519f44a63c3c7a4852750a0b78 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Wed, 5 Nov 2014 12:24:34 +0100 Subject: [PATCH] port easeInOutQuad --- renderlib.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/renderlib.py b/renderlib.py index 7ab771f..d981ce3 100644 --- a/renderlib.py +++ b/renderlib.py @@ -38,6 +38,13 @@ def easeOutQuad(t, b, c, d): t=float(t)/d 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): t=float(t)/d return t*c+b