Move generic lerp to math.hpp
This commit is contained in:
parent
78230f0f50
commit
1e4fb66a89
2 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue