Skip to content

Commit

Permalink
Fixed GTX_transform2 shear* functions #403
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet committed Nov 1, 2016
1 parent 33ea25c commit 03672e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions glm/gtx/transform2.inl
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D(tmat3x3<T, P> const& m, T s)
{
tmat3x3<T, P> r(1);
r[0][1] = s;
r[1][0] = s;
return m * r;
}

template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D(tmat3x3<T, P> const& m, T s)
{
tmat3x3<T, P> r(1);
r[1][0] = s;
r[0][1] = s;
return m * r;
}

template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D(tmat4x4<T, P> const& m, T s, T t)
{
tmat4x4<T, P> r(1);
r[1][0] = s;
r[2][0] = t;
r[0][1] = s;
r[0][2] = t;
return m * r;
}

template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D(tmat4x4<T, P> const& m, T s, T t)
{
tmat4x4<T, P> r(1);
r[0][1] = s;
r[2][1] = t;
r[1][0] = s;
r[1][2] = t;
return m * r;
}

template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D(tmat4x4<T, P> const& m, T s, T t)
{
tmat4x4<T, P> r(1);
r[0][2] = s;
r[1][2] = t;
r[2][0] = s;
r[2][1] = t;
return m * r;
}

Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 03672e9

Please sign in to comment.