SA_Maths
Sapphire Suite's C++ Maths Library
|
Lerp algorithms implementation. More...
#include <algorithm>
#include <SA/Maths/Debug.hpp>
#include <SA/Maths/Algorithms/Cos.hpp>
#include <SA/Maths/Algorithms/Sin.hpp>
Go to the source code of this file.
Functions | |
template<typename T > | |
T | SA::Maths::LerpUnclamped (const T &_start, const T &_end, float _alpha) noexcept |
Unclamped Lerp from _start to _end at _alpha. | |
template<typename T > | |
T | SA::Maths::Lerp (const T &_start, const T &_end, float _alpha) noexcept |
Clamped Lerp from _start to _end at _time. | |
template<typename T > | |
T | SA::Maths::SLerpUnclamped (const T &_start, const T &_end, float _alpha) noexcept |
Unclamped SLerp from _start to _end at _alpha. | |
template<typename T > | |
T | SA::Maths::SLerp (const T &_start, const T &_end, float _alpha) noexcept |
Clamped SLerp from _start to _end at _alpha. | |
Lerp algorithms implementation.
Clamped Lerp from _start to _end at _time.
Reference: https://en.wikipedia.org/wiki/Linear_interpolation
T | Input type. |
[in] | _start | Starting point of the lerp. |
[in] | _end | Ending point of the lerp. |
[in] | _alpha | Alpha of the lerp. |
|
noexcept |
Unclamped Lerp from _start to _end at _alpha.
Reference: https://en.wikipedia.org/wiki/Linear_interpolation
T | Input type. |
[in] | _start | Starting point of the lerp. |
[in] | _end | Ending point of the lerp. |
[in] | _alpha | Alpha of the lerp. |
|
noexcept |
Clamped SLerp from _start to _end at _alpha.
Reference: https://en.wikipedia.org/wiki/Slerp
T | Input type. |
[in] | _start | Starting point of the lerp. |
[in] | _end | Ending point of the lerp. |
[in] | _alpha | Alpha of the lerp. |
|
noexcept |
Unclamped SLerp from _start to _end at _alpha.
Reference: https://en.wikipedia.org/wiki/Slerp
T | Input type. |
[in] | _start | Starting point of the lerp. |
[in] | _end | Ending point of the lerp. |
[in] | _alpha | Alpha of the lerp. |
Reference: https://en.wikipedia.org/wiki/Slerp Formula: (Sin((1.0f - _alpha) * angle) * _start) / sin + (sinStep * _end) / sin.