https://github.com/fogleman/ease
Easing functions in #golang.
https://github.com/fogleman/ease
animation ease easing-functions golang
Last synced: about 1 month ago
JSON representation
Easing functions in #golang.
- Host: GitHub
- URL: https://github.com/fogleman/ease
- Owner: fogleman
- License: mit
- Created: 2017-02-27T02:14:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-01T02:50:50.000Z (over 8 years ago)
- Last Synced: 2025-04-01T20:11:15.736Z (3 months ago)
- Topics: animation, ease, easing-functions, golang
- Language: Go
- Size: 5.86 KB
- Stars: 95
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Easing Functions in Go
### Installation
go get -u github.com/fogleman/ease
### Documentation
[https://godoc.org/github.com/fogleman/ease](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)
