mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
add missing vec2 step
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
CGLM_INLINE vec2s glms_vec2_minv(vec2s a, vec2s b)
|
||||
CGLM_INLINE vec2s glms_vec2_clamp(vec2s v, float minVal, float maxVal)
|
||||
CGLM_INLINE vec2s glms_vec2_lerp(vec2s from, vec2s to, float t)
|
||||
CGLM_INLINE vec2s glms_vec2_step(vec2s edge, vec2s x)
|
||||
CGLM_INLINE vec2s glms_vec2_make(float * restrict src)
|
||||
CGLM_INLINE vec2s glms_vec2_reflect(vec2s v, vec2s n)
|
||||
CGLM_INLINE bool glms_vec2_refract(vec2s v, vec2s n, float eta, vec2s *dest)
|
||||
@@ -679,6 +680,21 @@ glms_vec2_(lerp)(vec2s from, vec2s to, float t) {
|
||||
return r;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief threshold function
|
||||
*
|
||||
* @param[in] edge threshold
|
||||
* @param[in] x value to test against threshold
|
||||
* @returns destination
|
||||
*/
|
||||
CGLM_INLINE
|
||||
vec2s
|
||||
glms_vec2_(step)(vec2s edge, vec2s x) {
|
||||
vec2s r;
|
||||
glm_vec2_step(edge.raw, x.raw, r.raw);
|
||||
return r;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Create two dimensional vector from pointer
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user