ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
asw::easing Namespace Reference

Typedefs

using EaseFunc = float (*)(float)
 Type alias for easing functions.
 

Functions

float linear (float t)
 
float easeInQuad (float t)
 
float easeOutQuad (float t)
 
float easeInOutQuad (float t)
 
float easeInCubic (float t)
 
float easeOutCubic (float t)
 
float easeInOutCubic (float t)
 
float easeInSine (float t)
 
float easeOutSine (float t)
 
float easeInOutSine (float t)
 
float easeInExpo (float t)
 
float easeOutExpo (float t)
 
float easeInOutExpo (float t)
 
float easeInElastic (float t)
 
float easeOutElastic (float t)
 
float easeInBounce (float t)
 
float easeOutBounce (float t)
 
float easeInBack (float t)
 
float easeOutBack (float t)
 
template<typename T >
ease (const T &a, const T &b, float t, EaseFunc func)
 

Typedef Documentation

◆ EaseFunc

using asw::easing::EaseFunc = float (*)(float)

Type alias for easing functions.

Definition at line 17 of file easing.h.

Function Documentation

◆ ease()

template<typename T >
T asw::easing::ease ( const T & a,
const T & b,
float t,
EaseFunc func )

Apply an easing function and lerp between two values

Parameters
aStart value
bEnd value
tProgress (0-1)
funcEasing function to apply

Definition at line 62 of file easing.h.

◆ easeInBack()

float asw::easing::easeInBack ( float t)

Definition at line 120 of file easing.cpp.

◆ easeInBounce()

float asw::easing::easeInBounce ( float t)

Definition at line 115 of file easing.cpp.

◆ easeInCubic()

float asw::easing::easeInCubic ( float t)

Definition at line 22 of file easing.cpp.

◆ easeInElastic()

float asw::easing::easeInElastic ( float t)

Definition at line 75 of file easing.cpp.

◆ easeInExpo()

float asw::easing::easeInExpo ( float t)

Definition at line 50 of file easing.cpp.

◆ easeInOutCubic()

float asw::easing::easeInOutCubic ( float t)

Definition at line 31 of file easing.cpp.

◆ easeInOutExpo()

float asw::easing::easeInOutExpo ( float t)

Definition at line 58 of file easing.cpp.

◆ easeInOutQuad()

float asw::easing::easeInOutQuad ( float t)

Definition at line 17 of file easing.cpp.

◆ easeInOutSine()

float asw::easing::easeInOutSine ( float t)

Definition at line 45 of file easing.cpp.

◆ easeInQuad()

float asw::easing::easeInQuad ( float t)

Definition at line 9 of file easing.cpp.

◆ easeInSine()

float asw::easing::easeInSine ( float t)

Definition at line 37 of file easing.cpp.

◆ easeOutBack()

float asw::easing::easeOutBack ( float t)

Definition at line 125 of file easing.cpp.

◆ easeOutBounce()

float asw::easing::easeOutBounce ( float t)

Definition at line 95 of file easing.cpp.

◆ easeOutCubic()

float asw::easing::easeOutCubic ( float t)

Definition at line 26 of file easing.cpp.

◆ easeOutElastic()

float asw::easing::easeOutElastic ( float t)

Definition at line 84 of file easing.cpp.

◆ easeOutExpo()

float asw::easing::easeOutExpo ( float t)

Definition at line 54 of file easing.cpp.

◆ easeOutQuad()

float asw::easing::easeOutQuad ( float t)

Definition at line 13 of file easing.cpp.

◆ easeOutSine()

float asw::easing::easeOutSine ( float t)

Definition at line 41 of file easing.cpp.

◆ linear()

float asw::easing::linear ( float t)

Definition at line 4 of file easing.cpp.