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 vec3s glms_vec3_broadcast(float val);
|
||||
CGLM_INLINE vec3s glms_vec3_fill(float val);
|
||||
CGLM_INLINE bool glms_vec3_eq(vec3s v, float val);
|
||||
CGLM_INLINE bool glms_vec3_eq_eps(vec3s v, float val);
|
||||
CGLM_INLINE bool glms_vec3_eq_all(vec3s v);
|
||||
@@ -48,6 +49,20 @@ glms_vec3_broadcast(float val) {
|
||||
return r;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief fill a vector with specified value
|
||||
*
|
||||
* @param[in] val value
|
||||
* @returns dest
|
||||
*/
|
||||
CGLM_INLINE
|
||||
vec3s
|
||||
glms_vec3_fill(float val) {
|
||||
vec3s r;
|
||||
glm_vec3_fill(r.raw, val);
|
||||
return r;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief check if vector is equal to value (without epsilon)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user