mirror of
https://github.com/recp/cglm.git
synced 2025-10-04 01:00:46 +00:00
is equal helper
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user