From 5e906ad45b0fce049a97716f7e59f74138ad5807 Mon Sep 17 00:00:00 2001 From: Chris Genova Date: Thu, 7 Sep 2017 19:37:43 -0700 Subject: [PATCH 1/2] Fixing gb_mat4_look_at --- gb_math.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gb_math.h b/gb_math.h index 62f84f4..ffd8d84 100644 --- a/gb_math.h +++ b/gb_math.h @@ -1731,9 +1731,9 @@ void gb_mat4_look_at(gbMat4 *out, gbVec3 eye, gbVec3 centre, gbVec3 up) { m[1][2] = -f.y; m[2][2] = -f.z; - m[3][0] = gb_vec3_dot(s, eye); - m[3][1] = gb_vec3_dot(u, eye); - m[3][2] = gb_vec3_dot(f, eye); + m[3][0] = -gb_vec3_dot(s, eye); + m[3][1] = -gb_vec3_dot(u, eye); + m[3][2] = +gb_vec3_dot(f, eye); } From 1bc8bf20f39a268a1ab3f6ffa00b816804d1d67f Mon Sep 17 00:00:00 2001 From: Chris Genova Date: Thu, 7 Sep 2017 19:46:53 -0700 Subject: [PATCH 2/2] Removing unreferenced variable --- gb_math.h | 1 - 1 file changed, 1 deletion(-) diff --git a/gb_math.h b/gb_math.h index ffd8d84..ad6f99e 100644 --- a/gb_math.h +++ b/gb_math.h @@ -1526,7 +1526,6 @@ void gb_mat4_inverse(gbMat4 *out, gbMat4 *in) { gbFloat4 *m = gb_float44_m(in); float ood; - float tmp; float sf00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; float sf01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];