Created
June 26, 2014 19:30
-
-
Save hilukasz/8fd3200f5da1d27af14e 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 x; | |
float easing = 0.05; | |
float targetX = origin; | |
float dx = targetX - x; | |
if(abs(dx) > 1) { | |
x += dx * easing; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment