templated the ClampedLerp function on ScalarType

This commit is contained in:
nico 2017-04-03 11:01:26 +02:00
parent c2cd4dfccb
commit 9a20565687
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ inline SCALAR Lerp(SCALAR a, SCALAR b, SCALAR lambda)
template <class SCALAR>
inline SCALAR ClampedLerp(SCALAR a, SCALAR b, SCALAR lambda)
{
math::Clamp(lambda, 0.f, 1.f);
math::Clamp(lambda, (SCALAR)0, (SCALAR)1);
return a * lambda + (1-lambda) * b;
}