feat: add easings
This commit is contained in:
67
include/misc/Easing.h
Normal file
67
include/misc/Easing.h
Normal file
@@ -0,0 +1,67 @@
|
||||
#pragma once
|
||||
|
||||
namespace td {
|
||||
namespace utils{
|
||||
|
||||
/* Sine functions */
|
||||
|
||||
float easeInSine(float x);
|
||||
float easeOutSine(float x);
|
||||
float easeInOutSine(float x);
|
||||
|
||||
/* Cubic functions */
|
||||
|
||||
float easeInCubic(float x);
|
||||
float easeOutCubic(float x);
|
||||
float easeInOutCubic(float x);
|
||||
|
||||
/* Quint functions */
|
||||
|
||||
float easeInQuint(float x);
|
||||
float easeOutQuint(float x);
|
||||
float easeInOutQuint(float x);
|
||||
|
||||
/* Circ functions */
|
||||
|
||||
float easeInCirc(float x);
|
||||
float easeOutCirc(float x);
|
||||
float easeInOutCirc(float x);
|
||||
|
||||
/* Elastic functions */
|
||||
|
||||
float easeInElastic(float x);
|
||||
float easeOutElastic(float x);
|
||||
float easeInOutElastic(float x);
|
||||
|
||||
/* Quad functions */
|
||||
|
||||
float easeInQuad(float x);
|
||||
float easeOutQuad(float x);
|
||||
float easeInOutQuad(float x);
|
||||
|
||||
/* Quart functions */
|
||||
|
||||
float easeInQuart(float x);
|
||||
float easeOutQuart(float x);
|
||||
float easeInOutQuart(float x);
|
||||
|
||||
/* Expo functions */
|
||||
|
||||
float easeInExpo(float x);
|
||||
float easeOutExpo(float x);
|
||||
float easeInOutExpo(float x);
|
||||
|
||||
/* Back functions */
|
||||
|
||||
float easeInBack(float x);
|
||||
float easeOutBack(float x);
|
||||
float easeInOutBack(float x);
|
||||
|
||||
/* Bounce functions */
|
||||
|
||||
float easeInBounce(float x);
|
||||
float easeOutBounce(float x);
|
||||
float easeInOutBounce(float x);
|
||||
|
||||
} // namespace utils
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user