From 9d0840789756fc7a973dee6fb59e139ba7e9855c Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Sun, 30 May 2021 12:46:26 +0300 Subject: [PATCH] win: suppress warnings --- include/cglm/quat.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/cglm/quat.h b/include/cglm/quat.h index ece4a78..670fdab 100644 --- a/include/cglm/quat.h +++ b/include/cglm/quat.h @@ -642,9 +642,12 @@ glm_quat_lerpc(versor from, versor to, float t, versor dest) { CGLM_INLINE void glm_quat_nlerp(versor from, versor to, float t, versor dest) { - float dot = glm_vec4_dot(from, to); versor target; - glm_vec4_scale(to, (dot >= 0) ? 1 : -1, target); + float dot; + + dot = glm_vec4_dot(from, to); + + glm_vec4_scale(to, (dot >= 0) ? 1.0f : -1.0f, target); glm_quat_lerp(from, target, t, dest); glm_quat_normalize(dest); }