Merge pull request #1028 from gottfriedleibniz/patch-axisangle

fix: matrix axisAngle #1028
This commit is contained in:
Christophe 2020-11-09 17:51:53 +01:00 committed by GitHub
commit 0fe622b020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ namespace glm
if (glm::abs(s) < T(0.001))
s = static_cast<T>(1);
T const angleCos = (m[0][0] + m[1][1] + m[2][2] - static_cast<T>(1)) * static_cast<T>(0.5);
if(angleCos - static_cast<T>(1) < epsilon)
if(abs(angleCos - static_cast<T>(1)) < epsilon)
angle = pi<T>() * static_cast<T>(0.25);
else
angle = acos(angleCos);