Browse Source

Fix operator-(), add operator+()

Sami Kankaristo 9 years ago
parent
commit
ad9bfffe65
1 changed files with 7 additions and 1 deletions
  1. 7 1
      glm/gtx/dual_quaternion.inl

+ 7 - 1
glm/gtx/dual_quaternion.inl

@@ -194,11 +194,17 @@ namespace glm
 	// -- Unary bit operators --
 
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tdualquat<T, P> operator-(tdualquat<T, P> const & q)
+	GLM_FUNC_QUALIFIER tdualquat<T, P> operator+(tdualquat<T, P> const & q)
 	{
 		return q;
 	}
 
+	template <typename T, precision P>
+	GLM_FUNC_QUALIFIER tdualquat<T, P> operator-(tdualquat<T, P> const & q)
+	{
+		return tdualquat<T, P>(-q.real, -q.dual);
+	}
+
 	// -- Binary operators --
 
 	template <typename T, precision P>