16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-17 23:39:18 +02:00

Replace interpolate with std::lerp and glm::mix

This commit is contained in:
docentYT
2026-05-02 01:31:38 +02:00
parent 362338ee5e
commit 3628eb0fc3
21 changed files with 108 additions and 116 deletions

View File

@@ -299,18 +299,6 @@ template <typename T> T min_speed(T const Left, T const Right)
return std::min(Left, Right);
}
template <typename Type_> Type_ interpolate(Type_ const &First, Type_ const &Second, float const Factor)
{
return static_cast<Type_>((First * (1.0f - Factor)) + (Second * Factor));
}
template <typename Type_> Type_ interpolate(Type_ const &First, Type_ const &Second, double const Factor)
{
return static_cast<Type_>((First * (1.0 - Factor)) + (Second * Factor));
}
template <typename Type_> Type_ smoothInterpolate(Type_ const &First, Type_ const &Second, double Factor)
{
// Apply smoothing (ease-in-out quadratic)