Fix return type of geom::lerp

This commit is contained in:
Nikita Lisitsa 2024-05-26 17:11:08 +03:00
parent 443fa3d8ca
commit d4f08acf24

View file

@ -45,7 +45,7 @@ namespace psemek::geom
} }
template <typename X, typename T> template <typename X, typename T>
X lerp(X const & x0, X const & x1, T const & t) auto lerp(X const & x0, X const & x1, T const & t) -> decltype(x0 * t)
{ {
return x0 * (T(1) - t) + x1 * t; return x0 * (T(1) - t) + x1 * t;
} }