8using EasingFn = std::function<float(
float )>;
26 return ( t == 0.0f ) ? 0.0f : pow( 2.0f, 10.0f * ( t - 1.0f ) );
31 return ( t == 1.0f ) ? 1.0f : 1.0f - pow( 2.0f, -10.0f * t );
44 if ( ( t /= 0.5f ) < 1.0f ) {
45 return 0.5f * pow( 2.0f, 10.0f * ( t - 1.0f ) );
48 return 0.5f * ( -pow( 2.0f, -10.0f * --t ) + 2.0f );
57 return 4.0f * t * t * t;
60 return ( -2.0f * t * t ) + ( 4.0f * t ) - 1.0f;
104 using namespace ease;
113 return cubeInQuadOut;
117 return materialEnter;
122 return [](
float t ) {
return t; };
float cubeInQuadOut(float t)
Definition: easing.h:54
float material(float t)
Definition: easing.h:68
float expoInOut(float t)
Definition: easing.h:34
float materialEnter(float t)
Definition: easing.h:74
float expoIn(float t)
Definition: easing.h:24
float expoOut(float t)
Definition: easing.h:29
float materialExit(float t)
Definition: easing.h:80
std::function< float(float)> easeFn(const EaseType &type)
Definition: easing.h:102
float cubicBezier(float x, float x1, float y1, float x2, float y2)
Definition: math.h:208
std::function< float(float)> EasingFn
Definition: easing.h:8
EaseType
Definition: easing.h:87