Browse Source

Fix metge

Christophe Riccio 12 years ago
parent
commit
d1fe2d26bf
1 changed files with 4 additions and 4 deletions
  1. 4 4
      glm/gtc/quaternion.inl

+ 4 - 4
glm/gtc/quaternion.inl

@@ -92,7 +92,7 @@ namespace detail
 		z(static_cast<T>(l.begin()[2])),
 		z(static_cast<T>(l.begin()[2])),
 		w(static_cast<T>(l.begin()[3]))
 		w(static_cast<T>(l.begin()[3]))
 	{
 	{
-		assert(l.size() == this->length());
+		assert(l.size() >= this->length());
 	}
 	}
 #endif//GLM_HAS_INITIALIZER_LISTS
 #endif//GLM_HAS_INITIALIZER_LISTS
 
 
@@ -678,17 +678,17 @@ namespace detail
 		T qwy(q.w * q.y);
 		T qwy(q.w * q.y);
 		T qwz(q.w * q.z);
 		T qwz(q.w * q.z);
 
 
-		Result[0][0] = 1 - 2 * (qyy -  qzz);
+		Result[0][0] = 1 - 2 * (qyy +  qzz);
 		Result[0][1] = 2 * (qxy + qwz);
 		Result[0][1] = 2 * (qxy + qwz);
 		Result[0][2] = 2 * (qxz - qwy);
 		Result[0][2] = 2 * (qxz - qwy);
 
 
 		Result[1][0] = 2 * (qxy - qwz);
 		Result[1][0] = 2 * (qxy - qwz);
-		Result[1][1] = 1 - 2 * (qxx -  qzz);
+		Result[1][1] = 1 - 2 * (qxx +  qzz);
 		Result[1][2] = 2 * (qyz + qwx);
 		Result[1][2] = 2 * (qyz + qwx);
 
 
 		Result[2][0] = 2 * (qxz + qwy);
 		Result[2][0] = 2 * (qxz + qwy);
 		Result[2][1] = 2 * (qyz - qwx);
 		Result[2][1] = 2 * (qyz - qwx);
-		Result[2][2] = 1 - 2 * (qxx -  qyy);
+		Result[2][2] = 1 - 2 * (qxx +  qyy);
 		return Result;
 		return Result;
 	}
 	}