mirror of
https://github.com/recp/cglm.git
synced 2026-11-17 18:17:13 -06:00
is equal helper
This commit is contained in:
1 parent
6ed426ca8b
commit
b99d240425
1 file changed
+13
@@ -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