Browse Source

Added missing equal operators

Christophe Riccio 15 years ago
parent
commit
d6dde1bf84
1 changed files with 23 additions and 0 deletions
  1. 23 0
      glm/gtc/quaternion.inl

+ 23 - 0
glm/gtc/quaternion.inl

@@ -238,6 +238,29 @@ namespace detail{
 			q.w / s, q.x / s, q.y / s, q.z / s);
 			q.w / s, q.x / s, q.y / s, q.z / s);
 	}
 	}
 
 
+	//////////////////////////////////////
+	// Boolean operators
+
+	template <typename T> 
+	inline bool operator==
+	(
+		detail::tquat<T> const & q1, 
+		detail::tquat<T> const & q2
+	)
+	{
+		return (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w);
+	}
+
+	template <typename T> 
+	inline bool operator!=
+	(
+		detail::tquat<T> const & q1, 
+		detail::tquat<T> const & q2
+	)
+	{
+		return (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w);
+	}
+
 }//namespace detail
 }//namespace detail
 
 
 namespace gtc{
 namespace gtc{