From b12c5e31c3118070ff275ba05acac5d6552812ec Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 30 Jul 2024 21:56:23 +0300 Subject: [PATCH] fix dot product --- src/vec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vec.h b/src/vec.h index 193c4e1..a468239 100644 --- a/src/vec.h +++ b/src/vec.h @@ -79,7 +79,7 @@ static inline t_fvec3 fvec3_scale(t_fvec3 a, float s) { } static inline float fvec3_dot(t_fvec3 a, t_fvec3 b) { - return a.x * b.x + a.x * b.x + a.z * b.z; + return a.x * b.x + a.y * b.y + a.z * b.z; } static inline t_fvec3 fvec3_cross(t_fvec3 a, t_fvec3 b) {