From 51a168e586d5cb911b95dc9e9037421452b4cb8c Mon Sep 17 00:00:00 2001 From: hgn Date: Mon, 17 Jul 2023 23:07:28 +0100 Subject: [PATCH] fixed mistake in quaternion normalize --- vg_m.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vg_m.h b/vg_m.h index 0ded4e1..8b354d6 100644 --- a/vg_m.h +++ b/vg_m.h @@ -628,11 +628,11 @@ static inline void q_inv( v4f q, v4f d ) d[3] = q[3]*s; } -static inline void q_nlerp( v4f a, v4f b, f32 t, v4f d ) -{ +static inline void q_nlerp( v4f a, v4f b, f32 t, v4f d ){ if( v4_dot(a,b) < 0.0f ){ - v4_muls( b, -1.0f, d ); - v4_lerp( a, d, t, d ); + v4f c; + v4_muls( b, -1.0f, c ); + v4_lerp( a, c, t, d ); } else v4_lerp( a, b, t, d ); -- 2.25.1