From 25feab786008d7e8498c6a1222d60671e58b33c0 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Mon, 10 Apr 2017 18:52:32 +0300 Subject: [PATCH] use multiplication instead of division for 1 / 2 --- include/cglm-quat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cglm-quat.h b/include/cglm-quat.h index e9e5693..ec514d8 100644 --- a/include/cglm-quat.h +++ b/include/cglm-quat.h @@ -31,7 +31,7 @@ glm_quat(versor q, float z) { float a, c, s; - a = angle / 2.0f; + a = angle * 0.5f; c = cosf(a); s = sinf(a); @@ -48,7 +48,7 @@ glm_quatv(versor q, vec3 v) { float a, c, s; - a = angle / 2.0f; + a = angle * 0.5f; c = cosf(a); s = sinf(a);