-
Notifications
You must be signed in to change notification settings - Fork 6
/
ease.go
29 lines (22 loc) · 1.08 KB
/
ease.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Package easing contains easing functions
package easing
// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
import (
"math"
)
// ////////////////////////////////////////////////////////////////////////////////// //
// DoublePi is 2 * Pi
const DoublePi = math.Pi * 2
// ////////////////////////////////////////////////////////////////////////////////// //
// Easing is type for any easing function
// t - current time
// b - start value
// c - changes in value
// d - duration
type Easing func(t, b, c, d float64) float64
// ////////////////////////////////////////////////////////////////////////////////// //