Browse Source

- Added constexpr for *vec*, *mat*, *quat* and *dual_quat* types #493

Christophe Riccio 9 years ago
parent
commit
7e86e9bc3c
2 changed files with 8 additions and 8 deletions
  1. 4 4
      glm/gtc/quaternion.hpp
  2. 4 4
      glm/gtc/quaternion.inl

+ 4 - 4
glm/gtc/quaternion.hpp

@@ -110,12 +110,12 @@ namespace glm
 		/// @param v A second normalized axis
 		/// @param v A second normalized axis
 		/// @see gtc_quaternion
 		/// @see gtc_quaternion
 		/// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors
 		/// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors
-		GLM_FUNC_DECL GLM_CONSTEXPR tquat(tvec3<T, P> const & u, tvec3<T, P> const & v);
+		GLM_FUNC_DECL tquat(tvec3<T, P> const & u, tvec3<T, P> const & v);
 
 
 		/// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
 		/// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
-		GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tquat(tvec3<T, P> const & eulerAngles);
-		GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tquat(tmat3x3<T, P> const & m);
-		GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tquat(tmat4x4<T, P> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT tquat(tvec3<T, P> const & eulerAngles);
+		GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat3x3<T, P> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat4x4<T, P> const & m);
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 

+ 4 - 4
glm/gtc/quaternion.inl

@@ -141,7 +141,7 @@ namespace detail
 	//}
 	//}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tvec3<T, P> const & u, tvec3<T, P> const & v)
+	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tvec3<T, P> const & u, tvec3<T, P> const & v)
 	{
 	{
 		tvec3<T, P> const LocalW(cross(u, v));
 		tvec3<T, P> const LocalW(cross(u, v));
 		T Dot = detail::compute_dot<tvec3, T, P>::call(u, v);
 		T Dot = detail::compute_dot<tvec3, T, P>::call(u, v);
@@ -151,7 +151,7 @@ namespace detail
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tvec3<T, P> const & eulerAngle)
+	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tvec3<T, P> const & eulerAngle)
 	{
 	{
 		tvec3<T, P> c = glm::cos(eulerAngle * T(0.5));
 		tvec3<T, P> c = glm::cos(eulerAngle * T(0.5));
 		tvec3<T, P> s = glm::sin(eulerAngle * T(0.5));
 		tvec3<T, P> s = glm::sin(eulerAngle * T(0.5));
@@ -163,13 +163,13 @@ namespace detail
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tmat3x3<T, P> const & m)
 	{
 	{
 		*this = quat_cast(m);
 		*this = quat_cast(m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tmat4x4<T, P> const & m)
 	{
 	{
 		*this = quat_cast(m);
 		*this = quat_cast(m);
 	}
 	}