diff options
author | Learn OpenGL ES <admin@learnopengles.com> | 2013-11-07 20:47:36 -0500 |
---|---|---|
committer | Learn OpenGL ES <admin@learnopengles.com> | 2013-11-07 20:54:15 -0500 |
commit | b08325fc4a184f9963035eb0df51e3d9aa31037d (patch) | |
tree | 2f5e9b2542d045035cce359fcad52feca80eaea7 | |
parent | d3641c368cf960c898f1b1f9c6fc5ee26c71d1b6 (diff) | |
download | linmath-b08325fc4a184f9963035eb0df51e3d9aa31037d.tar.gz linmath-b08325fc4a184f9963035eb0df51e3d9aa31037d.tar.xz linmath-b08325fc4a184f9963035eb0df51e3d9aa31037d.zip |
Fix bug with invert matrix (was copying one float instead of all floats).
-rw-r--r-- | linmath.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -298,7 +298,7 @@ static inline void mat4x4_invert(mat4x4 T, mat4x4 M) R[3][1] = M[0][0]*(M[2][1]*M[3][2] - M[2][2]*M[3][1]) - M[2][0]*(M[0][1]*M[3][2] - M[0][2]*M[3][1]) - M[3][0]*(M[0][2]*M[2][1] - M[0][1]*M[2][2]); R[3][2] = M[0][0]*(M[1][2]*M[3][1] - M[1][1]*M[3][2]) - M[1][0]*(M[0][2]*M[3][1] - M[0][1]*M[3][2]) - M[3][0]*(M[0][1]*M[1][2] - M[0][2]*M[1][1]); R[3][3] = M[0][0]*(M[1][1]*M[2][2] - M[1][2]*M[2][1]) - M[1][0]*(M[0][1]*M[2][2] - M[0][2]*M[2][1]) - M[2][0]*(M[0][2]*M[1][1] - M[0][1]*M[1][2]); - memcpy(T, R, sizeof(T)); + memcpy(T, R, sizeof(R)); } static inline void mat4x4_frustum(mat4x4 M, float l, float r, float b, float t, float n, float f) { |