Support different types of interpolated object & interpolation coefficient in geom::lerp

This commit is contained in:
Nikita Lisitsa 2021-01-15 17:57:37 +03:00
parent 863b251903
commit 918858aea5

View file

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