mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
added glm_vec_fill() (#100)
* alternative name for _broadcast(): _fill()
This commit is contained in:
committed by
Recep Aslantas
parent
4639f3184a
commit
144624962a
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
Functions:
|
||||
CGLM_INLINE void glm_vec3_broadcast(float val, vec3 d);
|
||||
CGLM_INLINE void glm_vec3_fill(vec3 v, float val);
|
||||
CGLM_INLINE bool glm_vec3_eq(vec3 v, float val);
|
||||
CGLM_INLINE bool glm_vec3_eq_eps(vec3 v, float val);
|
||||
CGLM_INLINE bool glm_vec3_eq_all(vec3 v);
|
||||
@@ -44,6 +45,18 @@ glm_vec3_broadcast(float val, vec3 d) {
|
||||
d[0] = d[1] = d[2] = val;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief fill a vector with specified value
|
||||
*
|
||||
* @param[out] v dest
|
||||
* @param[in] val value
|
||||
*/
|
||||
CGLM_INLINE
|
||||
void
|
||||
glm_vec3_fill(vec3 v, float val) {
|
||||
v[0] = v[1] = v[2] = val;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief check if vector is equal to value (without epsilon)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user