From c7af08f4ce83ab2208f86a74a882afa938ac2f85 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 25 Apr 2011 23:24:30 +0100 Subject: [PATCH 1/2] Fixed quaternion inverse, ticket #82 --- glm/gtc/quaternion.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 24f6a377..b6e5e0e8 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -422,7 +422,7 @@ namespace quaternion{ detail::tquat const & q ) { - return gtc::quaternion::conjugate(q) / gtc::quaternion::length(q); + return gtc::quaternion::conjugate(q) / gtc::quaternion::dot(q, q); } template From 1cf66a25d9bf7c9058b04becb2c28672c5014ab8 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 26 Apr 2011 12:45:29 +0100 Subject: [PATCH 2/2] Fixed make_vec* functions for XCode 4 --- glm/gtc/type_ptr.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/glm/gtc/type_ptr.hpp b/glm/gtc/type_ptr.hpp index cd137098..5f6e7a5c 100644 --- a/glm/gtc/type_ptr.hpp +++ b/glm/gtc/type_ptr.hpp @@ -15,6 +15,7 @@ // Dependency: #include "../glm.hpp" +#include #if(defined(GLM_MESSAGES) && !defined(glm_ext)) # pragma message("GLM: GLM_GTC_type_ptr extension included") @@ -420,23 +421,23 @@ namespace glm template inline detail::tmat2x2 make_mat2(T const * const ptr) { - return make_mat2x2(Result); + return make_mat2x2(ptr); } //! Build a matrix from a pointer. //! From GLM_GTC_type_ptr extension. template - inline detail::tmat3 make_mat3(T const * const ptr) + inline detail::tmat3x3 make_mat3(T const * const ptr) { - return make_mat3x3(Result); + return make_mat3x3(ptr); } //! Build a matrix from a pointer. //! From GLM_GTC_type_ptr extension. template - inline detail::tmat4 make_mat4(T const * const ptr) + inline detail::tmat4x4 make_mat4(T const * const ptr) { - return make_mat4x4(Result); + return make_mat4x4(ptr); } ///@}