Skip to content

Instantly share code, notes, and snippets.

@MAKIO135
Last active June 24, 2016 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MAKIO135/dfcd0b7725dc5f6e4d7a256395c205c3 to your computer and use it in GitHub Desktop.
Save MAKIO135/dfcd0b7725dc5f6e4d7a256395c205c3 to your computer and use it in GitHub Desktop.
ease function
function ease( variable, target, easingVal, sensib ) {
var d = target - variable;
var sensib = sensib || 1;
if ( Math.abs( d ) > sensib ) variable += d * easingVal;
else variable = target;
return variable;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment