mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Added assert to ensure lerp is used in the correct range of value
This commit is contained in:
parent
cd043f2ee2
commit
9926506c7f
@ -480,6 +480,10 @@ namespace detail
|
||||
T const & a
|
||||
)
|
||||
{
|
||||
// Lerp is only defined in [0, 1]
|
||||
assert(a >= T(0));
|
||||
assert(a <= T(1));
|
||||
|
||||
return x * (T(1) - a) + (y * a);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user