Plaquette
 
Loading...
Searching...
No Matches
pq_easing.h
1/*
2 * pq_easing.h
3 *
4 * Easing functions.
5 *
6 * (c) 2022 Sofian Audry :: info(@)sofianaudry(.)com
7 * (c) 2022 Thomas O Fredericks :: tof(@)t-o-f(.)info
8 *
9 * Source: https://github.com/nicolausYes/easing-functions/blob/master/src/easing.cpp
10 *
11 * This program is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 */
24
25#ifndef PQ_EASING_H_
26#define PQ_EASING_H_
27
28namespace pq {
29
30typedef float (*easing_function)(float);
31
33inline float easeNone(float t) { return t; }
34
35float easeInSine(float t);
36
37float easeOutSine(float t);
38
39float easeInOutSine(float t);
40
41float easeInQuad(float t);
42
43float easeOutQuad(float t);
44
45float easeInOutQuad(float t);
46
47float easeInCubic(float t);
48
49float easeOutCubic(float t);
50
51float easeInOutCubic(float t);
52
53float easeInQuart(float t);
54
55float easeOutQuart(float t);
56
57float easeInOutQuart(float t);
58
59float easeInQuint(float t);
60
61float easeOutQuint(float t);
62
63float easeInOutQuint(float t);
64
65float easeInExpo(float t);
66
67float easeOutExpo(float t);
68
69float easeInOutExpo(float t);
70
71float easeInCirc(float t);
72
73float easeOutCirc(float t);
74
75float easeInOutCirc(float t);
76
77float easeInBack(float t);
78
79float easeOutBack(float t);
80
81float easeInOutBack(float t);
82
83float easeInElastic(float t);
84
85float easeOutElastic(float t);
86
87float easeInOutElastic(float t);
88
89float easeInBounce(float t);
90
91float easeOutBounce(float t);
92
93float easeInOutBounce(float t);
94
95}
96
97#endif