diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp index 70df9beb..74f6fe3a 100644 --- a/glm/gtx/quaternion.hpp +++ b/glm/gtx/quaternion.hpp @@ -162,19 +162,19 @@ namespace glm valType extractRealComponent( detail::tquat const & q); - //! Returns roll value of euler angles. + //! Returns roll value of euler angles in degrees. //! From GLM_GTX_quaternion extension. template valType roll( detail::tquat const & x); - //! Returns pitch value of euler angles. + //! Returns pitch value of euler angles in degrees. //! From GLM_GTX_quaternion extension. template valType pitch( detail::tquat const & x); - //! Returns yaw value of euler angles. + //! Returns yaw value of euler angles in degrees. //! From GLM_GTX_quaternion extension. template valType yaw( @@ -183,7 +183,7 @@ namespace glm //! Returns euler angles, yitch as x, yaw as y, roll as z. //! From GLM_GTX_quaternion extension. template - detail::tvec3 eularAngles( + detail::tvec3 eulerAngles( detail::tquat const & x); //! Converts a quaternion to a 3 * 3 matrix. diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index 68dea929..e25ada4d 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -213,7 +213,7 @@ GLM_FUNC_QUALIFIER valType roll detail::tquat const & q ) { - return atan2(valType(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 glm::degrees(atan2(valType(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)); } template @@ -222,7 +222,7 @@ GLM_FUNC_QUALIFIER valType pitch detail::tquat const & q ) { - return atan2(valType(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 glm::degrees(atan2(valType(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)); } template @@ -231,7 +231,7 @@ GLM_FUNC_QUALIFIER valType yaw detail::tquat const & q ) { - return asin(valType(-2) * (q.x * q.z - q.w * q.y)); + return glm::degrees(asin(valType(-2) * (q.x * q.z - q.w * q.y))); } template