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::detail Namespace Reference

Functions

template<typename T >
T mix (const T &a, const T &b, float f)
 a + (b - a) * f. Integer types are worked in floating point, so a falling unsigned range does not wrap, and a result past the range of T, e.g. from an overshooting easing, is clamped to it.
 

Function Documentation

◆ mix()

template<typename T >
T asw::easing::detail::mix ( const T & a,
const T & b,
float f )

a + (b - a) * f. Integer types are worked in floating point, so a falling unsigned range does not wrap, and a result past the range of T, e.g. from an overshooting easing, is clamped to it.

Parameters
aStart value
bEnd value
fAmount of the way from a to b
Returns
The value f of the way from a to b

Definition at line 33 of file easing.h.