From 880df2cad6b11b52f28da8ff70aaa6533c9f6b26 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Sat, 10 Dec 2016 11:30:15 +0200 Subject: [PATCH] vec: fix equal helper --- include/cglm-vec-ext.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cglm-vec-ext.h b/include/cglm-vec-ext.h index 90f3e8f..7fecfbb 100644 --- a/include/cglm-vec-ext.h +++ b/include/cglm-vec-ext.h @@ -70,13 +70,13 @@ glm_vec4_broadcast(float val, vec3 d) { CGLM_INLINE bool glm_vec_eq(vec3 v, float val) { - return v[0] == v[1] == v[2] == val; + return v[0] == val && v[0] == v[1] && v[0] == v[2]; } CGLM_INLINE bool glm_vec4_eq(vec4 v, float val) { - return v[0] == v[1] == v[2] == v[3] == val; + return v[0] == val && v[0] == v[1] && v[0] == v[2] && v[0] == v[3]; } #endif /* cglm_vec_ext_h */