Browse Source

Add constexpr to normalize

cmd05 7 months ago
parent
commit
78049f1f2e
2 changed files with 2 additions and 2 deletions
  1. 1 1
      glm/ext/quaternion_geometric.hpp
  2. 1 1
      glm/ext/quaternion_geometric.inl

+ 1 - 1
glm/ext/quaternion_geometric.hpp

@@ -44,7 +44,7 @@ namespace glm
 	///
 	/// @see ext_quaternion_geometric
 	template<typename T, qualifier Q>
-	GLM_FUNC_DECL qua<T, Q> normalize(qua<T, Q> const& q);
+	GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q> normalize(qua<T, Q> const& q);
 
 	/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
 	///

+ 1 - 1
glm/ext/quaternion_geometric.inl

@@ -14,7 +14,7 @@ namespace glm
 	}
 
 	template<typename T, qualifier Q>
-	GLM_FUNC_QUALIFIER qua<T, Q> normalize(qua<T, Q> const& q)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua<T, Q> normalize(qua<T, Q> const& q)
 	{
 		T len = length(q);
 		if(len <= static_cast<T>(0)) // Problem