Move generic lerp to math.hpp

This commit is contained in:
Nikita Lisitsa 2020-10-01 09:44:23 +03:00
parent 78230f0f50
commit 1e4fb66a89
2 changed files with 6 additions and 6 deletions

View file

@ -23,4 +23,10 @@ namespace psemek::geom
return static_cast<T>((x * pi) / 180);
}
template <typename T>
T lerp(T const & x0, T const & x1, T const & t)
{
return x0 * (T(1) - t) + x1 * t;
}
}

View file

@ -256,12 +256,6 @@ namespace psemek::geom
return ort(v0, v1);
}
template <typename T>
T lerp(T const & x0, T const & x1, T const & t)
{
return x0 * (T(1) - t) + x1 * t;
}
template <typename T, std::size_t N>
vector<T, N> lerp(vector<T, N> const & v0, vector<T, N> const & v1, T const & t)
{