Browse Source

Merge branch '0.9.3' of ssh://ogl-math.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.3

Christophe Riccio 14 years ago
parent
commit
c0e426c48a
2 changed files with 7 additions and 7 deletions
  1. 4 4
      glm/gtx/quaternion.hpp
  2. 3 3
      glm/gtx/quaternion.inl

+ 4 - 4
glm/gtx/quaternion.hpp

@@ -162,19 +162,19 @@ namespace glm
 	valType extractRealComponent(
 	valType extractRealComponent(
 		detail::tquat<valType> const & q);
 		detail::tquat<valType> const & q);
 
 
-    //! Returns roll value of euler angles. 
+    //! Returns roll value of euler angles in degrees. 
 	//! From GLM_GTX_quaternion extension.
 	//! From GLM_GTX_quaternion extension.
 	template <typename valType> 
 	template <typename valType> 
 	valType roll(
 	valType roll(
 		detail::tquat<valType> const & x);
 		detail::tquat<valType> const & x);
 
 
-	//! Returns pitch value of euler angles. 
+	//! Returns pitch value of euler angles in degrees. 
 	//! From GLM_GTX_quaternion extension.
 	//! From GLM_GTX_quaternion extension.
     template <typename valType> 
     template <typename valType> 
 	valType pitch(
 	valType pitch(
 		detail::tquat<valType> const & x);
 		detail::tquat<valType> const & x);
 
 
-    //! Returns yaw value of euler angles. 
+    //! Returns yaw value of euler angles in degrees. 
 	//! From GLM_GTX_quaternion extension.
 	//! From GLM_GTX_quaternion extension.
 	template <typename valType> 
 	template <typename valType> 
 	valType yaw(
 	valType yaw(
@@ -183,7 +183,7 @@ namespace glm
 	//! Returns euler angles, yitch as x, yaw as y, roll as z. 
 	//! Returns euler angles, yitch as x, yaw as y, roll as z. 
 	//! From GLM_GTX_quaternion extension.
 	//! From GLM_GTX_quaternion extension.
 	template <typename valType> 
 	template <typename valType> 
-	detail::tvec3<valType> eularAngles(
+	detail::tvec3<valType> eulerAngles(
 		detail::tquat<valType> const & x);
 		detail::tquat<valType> const & x);
 
 
 	//! Converts a quaternion to a 3 * 3 matrix. 
 	//! Converts a quaternion to a 3 * 3 matrix. 

+ 3 - 3
glm/gtx/quaternion.inl

@@ -213,7 +213,7 @@ GLM_FUNC_QUALIFIER valType roll
 	detail::tquat<valType> const & q
 	detail::tquat<valType> 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 <typename valType> 
 template <typename valType> 
@@ -222,7 +222,7 @@ GLM_FUNC_QUALIFIER valType pitch
 	detail::tquat<valType> const & q
 	detail::tquat<valType> 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 <typename valType> 
 template <typename valType> 
@@ -231,7 +231,7 @@ GLM_FUNC_QUALIFIER valType yaw
 	detail::tquat<valType> const & q
 	detail::tquat<valType> 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 <typename valType> 
 template <typename valType>