From 03672e94282a1854d7230ee22ac7a91d2fcf5494 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 1 Nov 2016 23:44:03 +0100 Subject: [PATCH] Fixed GTX_transform2 shear* functions #403 --- glm/gtx/transform2.inl | 16 ++++++++-------- readme.md | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/glm/gtx/transform2.inl b/glm/gtx/transform2.inl index b65bd3db..6e0ab310 100644 --- a/glm/gtx/transform2.inl +++ b/glm/gtx/transform2.inl @@ -7,7 +7,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat3x3 shearX2D(tmat3x3 const& m, T s) { tmat3x3 r(1); - r[0][1] = s; + r[1][0] = s; return m * r; } @@ -15,7 +15,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat3x3 shearY2D(tmat3x3 const& m, T s) { tmat3x3 r(1); - r[1][0] = s; + r[0][1] = s; return m * r; } @@ -23,8 +23,8 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 shearX3D(tmat4x4 const& m, T s, T t) { tmat4x4 r(1); - r[1][0] = s; - r[2][0] = t; + r[0][1] = s; + r[0][2] = t; return m * r; } @@ -32,8 +32,8 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 shearY3D(tmat4x4 const& m, T s, T t) { tmat4x4 r(1); - r[0][1] = s; - r[2][1] = t; + r[1][0] = s; + r[1][2] = t; return m * r; } @@ -41,8 +41,8 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 shearZ3D(tmat4x4 const& m, T s, T t) { tmat4x4 r(1); - r[0][2] = s; - r[1][2] = t; + r[2][0] = s; + r[2][1] = t; return m * r; } diff --git a/readme.md b/readme.md index 5e8c3176..aba6b1f6 100644 --- a/readme.md +++ b/readme.md @@ -57,6 +57,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) ##### Fixes: - Fixed Android build error with C++11 compiler but C++98 STL #284 #564 +- Fixed GTX_transform2 shear* functions #403 #### [GLM 0.9.8.2](https://github.com/g-truc/glm/releases/tag/0.9.8.2) - 2016-11-01 ##### Improvements: