Method: CGLM::Vec3#project
- Defined in:
- ext/cglm/rb_cglm_vec3.c
#project(vec[, dest]) ⇒ dest | new Vec3
Projects self onto the given Vec3. Places the result into dest and
returns dest. Creates and returns a new Vec3 if dest is omitted.
500 501 502 503 504 505 506 |
# File 'ext/cglm/rb_cglm_vec3.c', line 500 VALUE rb_cglm_vec3_project(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_proj(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest)); return dest; } |