go get -u github.com/fogleman/ease
https://godoc.org/github.com/fogleman/ease
All easing functions take a float64
and return a float64
. The input should be between 0 and 1, inclusive.
t = ease.OutElastic(t)
Some easing functions have extra parameters, like period
. Here is an example:
var f ease.Function
f = ease.OutElasticFunction(0.5)
t = f(t)
Or, simply...
t = ease.OutElasticFunction(0.5)(t)