is equal helper

This commit is contained in:
Recep Aslantas
2016-10-30 19:30:38 +02:00
parent 6ed426ca8b
commit b99d240425

View File

@@ -14,6 +14,7 @@
#include "cglm-common.h"
#include "cglm-intrin.h"
#include <stdbool.h>
/*!
* @brief multiplies individual items, just for convenient like SIMD
@@ -66,4 +67,16 @@ glm_vec4_broadcast(float val, vec3 d) {
#endif
}
CGLM_INLINE
bool
glm_vec_eq(vec3 v, float val) {
return v[0] == v[1] == v[2] == val;
}
CGLM_INLINE
bool
glm_vec4_eq(vec4 v, float val) {
return v[0] == v[1] == v[2] == v[3] == val;
}
#endif /* cglm_vec_ext_h */