Fix Clang warnings about use of abs()

master
Piotr Dziwinski 2015-08-06 14:29:47 +02:00
parent 654ef7ba59
commit f29a826ad2
2 changed files with 2 additions and 2 deletions

View File

@ -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());

View File

@ -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());