Created
January 21, 2015 22:53
-
-
Save maxweisel/c309903ad10c291fbfb5 to your computer and use it in GitHub Desktop.
This file contains 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
// Takes in a linear value from 0-1. Outputs the ease in/out version of it. | |
float value = linearValue*2.0; | |
if (value < 1.0) { | |
value = 0.5 * powf(value, 2.0); | |
} else { | |
value = 1.0 - 0.5 * powf(2.0-value, 2.0); | |
} | |
return value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment