Method: CGLM::Vec3#max
- Defined in:
- ext/cglm/rb_cglm_vec3.c
#max(vec[, dest]) ⇒ dest | new Vec3
Finds the higher of each component (x, y, z) between self and vec.
Places the result into dest and returns dest. Creates and returns a new
Vec3 if dest is omitted.
554 555 556 557 558 559 560 |
# File 'ext/cglm/rb_cglm_vec3.c', line 554 VALUE rb_cglm_vec3_max(int argc, VALUE *argv, VALUE self) { VALUE b, dest; rb_scan_args(argc, argv, "11", &b, &dest); if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3); glm_vec3_maxv(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest)); return dest; } |