is uniform scaled func for mat4

This commit is contained in:
Recep Aslantas
2017-01-11 16:31:07 +02:00
parent 16107c4ba1
commit b1989bf3c9
2 changed files with 29 additions and 0 deletions

View File

@@ -73,10 +73,22 @@ glm_vec_eq(vec3 v, float val) {
return v[0] == val && v[0] == v[1] && v[0] == v[2];
}
CGLM_INLINE
bool
glm_vec_eq_all(vec3 v) {
return v[0] == v[1] && v[0] == v[2];
}
CGLM_INLINE
bool
glm_vec4_eq(vec4 v, float val) {
return v[0] == val && v[0] == v[1] && v[0] == v[2] && v[0] == v[3];
}
CGLM_INLINE
bool
glm_vec4_eq_all(vec4 v) {
return v[0] == v[1] && v[0] == v[2] && v[0] == v[3];
}
#endif /* cglm_vec_ext_h */