Support different types of interpolated object & interpolation coefficient in geom::lerp
This commit is contained in:
parent
863b251903
commit
918858aea5
1 changed files with 2 additions and 2 deletions
|
|
@ -37,8 +37,8 @@ namespace psemek::geom
|
||||||
return static_cast<T>((x * pi) / 180);
|
return static_cast<T>((x * pi) / 180);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename X, typename T>
|
||||||
T lerp(T const & x0, T const & x1, T const & t)
|
X lerp(X const & x0, X const & x1, T const & t)
|
||||||
{
|
{
|
||||||
return x0 * (T(1) - t) + x1 * t;
|
return x0 * (T(1) - t) + x1 * t;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue