diff --git a/src/graphics/opengl/gl21device.cpp b/src/graphics/opengl/gl21device.cpp index aacfc31d..a64b326d 100644 --- a/src/graphics/opengl/gl21device.cpp +++ b/src/graphics/opengl/gl21device.cpp @@ -429,7 +429,7 @@ void CGL21Device::SetTransform(TransformType type, const Math::Matrix &matrix) // normal transform Math::Matrix normalMat = matrix; - if (abs(normalMat.Det()) > 1e-6) + if (fabs(normalMat.Det()) > 1e-6) normalMat = normalMat.Inverse(); glUniformMatrix4fv(uni_NormalMatrix, 1, GL_TRUE, normalMat.Array()); diff --git a/src/graphics/opengl/gl33device.cpp b/src/graphics/opengl/gl33device.cpp index f15625f7..b27b4cb6 100644 --- a/src/graphics/opengl/gl33device.cpp +++ b/src/graphics/opengl/gl33device.cpp @@ -456,7 +456,7 @@ void CGL33Device::SetTransform(TransformType type, const Math::Matrix &matrix) // normal transform Math::Matrix normalMat = matrix; - if (abs(normalMat.Det()) > 1e-6) + if (fabs(normalMat.Det()) > 1e-6) normalMat = normalMat.Inverse(); glUniformMatrix4fv(uni_NormalMatrix, 1, GL_TRUE, normalMat.Array());