feat: add easings

This commit is contained in:
2021-09-11 11:24:33 +02:00
parent e8623ee86c
commit b624f40808
2 changed files with 267 additions and 0 deletions

67
include/misc/Easing.h Normal file
View 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