diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index be9efc3c..a37c7e3b 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -661,7 +661,7 @@ namespace detail ) { #ifdef GLM_FORCE_RADIANS - return T(atan2(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); + return T(atan(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); #else # pragma message("GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.") return glm::degrees(atan(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); @@ -675,7 +675,7 @@ namespace detail ) { #ifdef GLM_FORCE_RADIANS - return T(atan2(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); + return T(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); #else # pragma message("GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.") return glm::degrees(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); diff --git a/readme.txt b/readme.txt index 4601a628..c1ac648e 100644 --- a/readme.txt +++ b/readme.txt @@ -45,6 +45,7 @@ GLM 0.9.5.2: 2014-02-08 - Fixed mix function link error - Fixed SSE code included in GLM tests on "pure" platforms - Fixed undefined reference to fastInverseSqrt (#161) +- Fixed GLM_FORCE_RADIANS with build error (#165) ================================================================================ GLM 0.9.5.1: 2014-01-11 diff --git a/test/gtx/gtx_quaternion.cpp b/test/gtx/gtx_quaternion.cpp index 49f6b5d9..da052954 100644 --- a/test/gtx/gtx_quaternion.cpp +++ b/test/gtx/gtx_quaternion.cpp @@ -8,9 +8,12 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// #define GLM_FORCE_RADIANS -#include #include +#include +#include +#include #include +#include int test_quat_fastMix() {