Fix Clang warnings about use of abs()
parent
654ef7ba59
commit
f29a826ad2
|
@ -429,7 +429,7 @@ void CGL21Device::SetTransform(TransformType type, const Math::Matrix &matrix)
|
||||||
// normal transform
|
// normal transform
|
||||||
Math::Matrix normalMat = matrix;
|
Math::Matrix normalMat = matrix;
|
||||||
|
|
||||||
if (abs(normalMat.Det()) > 1e-6)
|
if (fabs(normalMat.Det()) > 1e-6)
|
||||||
normalMat = normalMat.Inverse();
|
normalMat = normalMat.Inverse();
|
||||||
|
|
||||||
glUniformMatrix4fv(uni_NormalMatrix, 1, GL_TRUE, normalMat.Array());
|
glUniformMatrix4fv(uni_NormalMatrix, 1, GL_TRUE, normalMat.Array());
|
||||||
|
|
|
@ -456,7 +456,7 @@ void CGL33Device::SetTransform(TransformType type, const Math::Matrix &matrix)
|
||||||
// normal transform
|
// normal transform
|
||||||
Math::Matrix normalMat = matrix;
|
Math::Matrix normalMat = matrix;
|
||||||
|
|
||||||
if (abs(normalMat.Det()) > 1e-6)
|
if (fabs(normalMat.Det()) > 1e-6)
|
||||||
normalMat = normalMat.Inverse();
|
normalMat = normalMat.Inverse();
|
||||||
|
|
||||||
glUniformMatrix4fv(uni_NormalMatrix, 1, GL_TRUE, normalMat.Array());
|
glUniformMatrix4fv(uni_NormalMatrix, 1, GL_TRUE, normalMat.Array());
|
||||||
|
|
Loading…
Reference in New Issue