18 constexpr T c1 = (T)1.70158;
19 constexpr T c2 = c1 * (T)1.525;
23 ? (
nem::sqr(v) * ((c2 + 1) * v - c2)) / 2
24 : (
nem::sqr(v - 2) * ((c2 + 1) * (v - 2) + c2) + 2) / 2;
27 template <std::
floating_po
int T>
constexpr T
in_back(T v)
29 constexpr T c1 = (T)1.70158;
30 constexpr T c2 = c1 + 1;
35 template <std::
floating_po
int T>
constexpr T
out_back(T v)
37 constexpr T c1 = (T)1.70158;
38 constexpr T c2 = c1 + 1;
43 template <std::
floating_po
int T>
constexpr T
in_sine(T v)
48 template <std::
floating_po
int T>
constexpr T
out_sine(T v)
58 template <std::
floating_po
int T>
constexpr T
in_bounce(T v)
60 constexpr T n1 = (T)7.5625;
61 constexpr T d1 = (T)(1.0 / 2.75);
69 return n1 * (v -= (T)1.5f * d1) * v + (T)0.75;
71 else if (v < (T)2.5 * d1)
73 return n1 * (v -= (T)2.25f * d1) * v + (T)0.9375;
77 return n1 * (v -= (T)2.625f * d1) * v + (T)0.984375;
81 template <std::
floating_po
int T>
constexpr T
out_bounce(T v)
83 constexpr T n1 = (T)7.5625;
84 constexpr T d1 = (T)(1.0 / 2.75);
92 return n1 * (v -= (T)1.5 * d1) * v + (T)0.75;
94 else if (v < 2.5f * d1)
96 return n1 * (v -= (T)2.25 * d1) * v + (T)0.9375;
100 return n1 * (v -= (T)2.625 * d1) * v + (T)0.984375;
119 : -
nem::pow((T)2, (T)10 * v - (T)10) *
nem::sin((v * (T)10 - (T)10.75) * c4));
130 :
nem::pow((T)2, (T)-10 * v) *
nem::sin((v * (T)10 - (T)0.75) * c4) + (T)1);
142 ? -(
nem::pow((T)2.0, (T)20 * v - (T)10) *
nem::sin(((T)20 * v - (T)11.125) * c5)) * (T)0.5
143 : (
nem::pow((T)2.0, (T)-20 * v + (T)10) *
nem::sin(((T)20 * v - (T)11.125) * c5)) * (T)0.5 + (T)1));
146 template <std::
floating_po
int T>
constexpr T
in_cubic(T v)
151 template <std::
floating_po
int T>
constexpr T
out_cubic(T v)
158 return v < 0.5f ? 4 * v * v * v : 1 -
nem::cube(-2 * v + 2) * (T)0.5;
constexpr T in_out_back(T v)
constexpr T out_back(T v)
constexpr T in_out_bounce(T v)
constexpr T out_cubic(T v)
constexpr T out_bounce(T v)
constexpr T out_sine(T v)
constexpr T in_out_sine(T v)
constexpr T in_bounce(T v)
constexpr T in_cubic(T v)
constexpr T in_out_cubic(T v)
constexpr T pow(T base, E exp)
constexpr T sqr(T value) noexcept
constexpr T cube(T value) noexcept