mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 11:24:35 +00:00
fix: ensure scaleBias matrix is zeroed
This commit is contained in:
parent
fc8f4bb442
commit
693c9b8be2
@ -108,7 +108,7 @@ namespace glm
|
|||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scaleBias(T scale, T bias)
|
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scaleBias(T scale, T bias)
|
||||||
{
|
{
|
||||||
mat<4, 4, T, Q> result;
|
mat<4, 4, T, Q> result(T(0));
|
||||||
result[3] = vec<4, T, Q>(vec<3, T, Q>(bias), static_cast<T>(1));
|
result[3] = vec<4, T, Q>(vec<3, T, Q>(bias), static_cast<T>(1));
|
||||||
result[0][0] = scale;
|
result[0][0] = scale;
|
||||||
result[1][1] = scale;
|
result[1][1] = scale;
|
||||||
|
Loading…
Reference in New Issue
Block a user