Created
July 19, 2017 15:42
-
-
Save kosmolot/5069e040e9623d5138b8db5e7d1aadb9 to your computer and use it in GitHub Desktop.
cubic_bezier method (Vala)
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
public float cubic_bezier (float t, float a, float b, float c, float d) { | |
float u = 1 - t; | |
float tt = t * t; | |
float uu = u * u; | |
float uuu = uu * u; | |
float ttt = tt * t; | |
return (uuu * a) + (3 * uu * t * b) + (3 * u * tt * c) + (ttt * d); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment