瀏覽代碼

Merge branch '0.9.2' into cuda

Christophe Riccio 14 年之前
父節點
當前提交
5d2673fbba
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 1 1
      glm/gtc/quaternion.inl
  2. 4 3
      glm/gtc/type_ptr.hpp

+ 1 - 1
glm/gtc/quaternion.inl

@@ -422,7 +422,7 @@ namespace quaternion{
 		detail::tquat<T> const & q
 		detail::tquat<T> const & q
 	)
 	)
     {
     {
-        return gtc::quaternion::conjugate(q) / gtc::quaternion::length(q);
+        return gtc::quaternion::conjugate(q) / gtc::quaternion::dot(q, q);
     }
     }
 
 
     template <typename T> 
     template <typename T> 

+ 4 - 3
glm/gtc/type_ptr.hpp

@@ -15,6 +15,7 @@
 
 
 // Dependency:
 // Dependency:
 #include "../glm.hpp"
 #include "../glm.hpp"
+#include <cstring>
 
 
 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
 #	pragma message("GLM: GLM_GTC_type_ptr extension included")
 #	pragma message("GLM: GLM_GTC_type_ptr extension included")
@@ -420,7 +421,7 @@ namespace glm
 		template<typename T>
 		template<typename T>
 		inline detail::tmat2x2<T> make_mat2(T const * const ptr)
 		inline detail::tmat2x2<T> make_mat2(T const * const ptr)
 		{
 		{
-			return make_mat2x2(Result);
+			return make_mat2x2(ptr);
 		}
 		}
         
         
 		//! Build a matrix from a pointer.
 		//! Build a matrix from a pointer.
@@ -428,7 +429,7 @@ namespace glm
 		template<typename T>
 		template<typename T>
 		inline detail::tmat3x3<T> make_mat3(T const * const ptr)
 		inline detail::tmat3x3<T> make_mat3(T const * const ptr)
 		{
 		{
-			return make_mat3x3(Result);
+			return make_mat3x3(ptr);
 		}
 		}
 		
 		
 		//! Build a matrix from a pointer.
 		//! Build a matrix from a pointer.
@@ -436,7 +437,7 @@ namespace glm
 		template<typename T>
 		template<typename T>
 		inline detail::tmat4x4<T> make_mat4(T const * const ptr)
 		inline detail::tmat4x4<T> make_mat4(T const * const ptr)
 		{
 		{
-			return make_mat4x4(Result);
+			return make_mat4x4(ptr);
 		}
 		}
         
         
 		///@}
 		///@}