From 6881e1bb908cb5bac5e160acd2ced14127703aac Mon Sep 17 00:00:00 2001 From: Dustin Biser Date: Sat, 5 Oct 2013 15:34:03 -0400 Subject: [PATCH 1/2] Refactored glm/gtc/quaternion mat3_cast - Factored out minus signs. Previous commit was incorrect. --- glm/gtc/quaternion.inl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index a34e40ce..d2e1bd20 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -678,17 +678,17 @@ namespace detail T qwy(q.w * q.y); 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][2] = 2 * (qxz - qwy); 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[2][0] = 2 * (qxz + qwy); Result[2][1] = 2 * (qyz - qwx); - Result[2][2] = 1 - 2 * (qxx - qyy); + Result[2][2] = 1 - 2 * (qxx + qyy); return Result; } From cfd0bd6e13fae401f6a5f46aa1f9f13f64464d59 Mon Sep 17 00:00:00 2001 From: Dustin Biser Date: Sat, 5 Oct 2013 16:27:01 -0400 Subject: [PATCH 2/2] Fixed assert error typo in quaternion.inl Changed v to l, as unknown variable v was causing compile errors in user code. --- 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 d2e1bd20..ab503cdb 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -92,7 +92,7 @@ namespace detail z(static_cast(l.begin()[2])), w(static_cast(l.begin()[3])) { - assert(v.size() >= this->length()); + assert(l.size() >= this->length()); } #endif//GLM_HAS_INITIALIZER_LISTS