Created
October 2, 2010 16:51
-
-
Save kvannotten/607791 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float linearTween(float t, float start, float end){ | |
return t * start + (1-t) * end; | |
} | |
float QuadraticEaseInOut(float t, float start, float end){ | |
float middle = (start + end) / 2; | |
t = 2 * t; | |
if (t <= 1) | |
return linearTween(t*t, start, middle); | |
t-= 1; | |
return linearTween(t*t, middle, end); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment