From c9f623e7175f6914b434090e966719a744657b32 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 8 Sep 2013 15:23:13 +0200 Subject: [PATCH] Fixed glm::orientation with GLM_FORCE_RADIANS defined #112 --- glm/gtx/rotate_vector.inl | 6 +++++- readme.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/glm/gtx/rotate_vector.inl b/glm/gtx/rotate_vector.inl index a89cc57a..1ec1717b 100644 --- a/glm/gtx/rotate_vector.inl +++ b/glm/gtx/rotate_vector.inl @@ -205,7 +205,11 @@ namespace glm return detail::tmat4x4(T(1)); detail::tvec3 RotationAxis = cross(Up, Normal); - T Angle = degrees(acos(dot(Normal, Up))); +# ifdef GLM_FORCE_RADIANS + T Angle = acos(dot(Normal, Up)); +# else + T Angle = degrees(acos(dot(Normal, Up))); +# endif return rotate(Angle, RotationAxis); } }//namespace glm diff --git a/readme.txt b/readme.txt index b1a0d41e..18297889 100644 --- a/readme.txt +++ b/readme.txt @@ -48,6 +48,7 @@ GLM 0.9.4.6: 2013-08-XX - Added use of GCC frontend on Unix for ICC and Visual C++ fronted on Windows for ICC - Added compilation errors for unsupported compiler versions +- Fixed glm::orientation with GLM_FORCE_RADIANS defined #112 ================================================================================ GLM 0.9.4.5: 2013-08-12