ease
ease copied to clipboard
Easing functions in #golang.
Easing Functions in Go
Installation
go get -u github.com/fogleman/ease
Documentation
https://godoc.org/github.com/fogleman/ease
Usage
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)

ease.Linear(t)

ease.InQuad(t)

ease.InCubic(t)

ease.InQuart(t)

ease.InQuint(t)

ease.InSine(t)

ease.InExpo(t)

ease.InCirc(t)

ease.InElastic(t)

ease.InBack(t)

ease.InBounce(t)

ease.OutQuad(t)

ease.OutCubic(t)

ease.OutQuart(t)

ease.OutQuint(t)

ease.OutSine(t)

ease.OutExpo(t)

ease.OutCirc(t)

ease.OutElastic(t)

ease.OutBack(t)

ease.OutBounce(t)

ease.InOutQuad(t)

ease.InOutCubic(t)

ease.InOutQuart(t)

ease.InOutQuint(t)

ease.InOutSine(t)

ease.InOutExpo(t)

ease.InOutCirc(t)

ease.InOutElastic(t)

ease.InOutBack(t)

ease.InOutBounce(t)
