Skip to content

Instantly share code, notes, and snippets.

@SwadicalRag
Created May 10, 2015 20:45
Show Gist options
  • Save SwadicalRag/73141e36a07950e6c9e0 to your computer and use it in GitHub Desktop.
Save SwadicalRag/73141e36a07950e6c9e0 to your computer and use it in GitHub Desktop.
Easing
function ease(Time,Initial,Final,TimeElapsed)
Time = Time/(TimeElapsed/2)
if (Time < 1) then
return -Final/2 * ((1 - Time*Time)^0.5 - 1) + Initial
end
Time = Time-2
return Final/2 * ((1 - Time*Time)^0.5 + 1) + Initial
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment