Method: CGLM::Mat4#mul_vec3

Defined in:
ext/cglm/rb_cglm_mat4.c

#mul_vec3(*args) ⇒ Object



86
87
88
89
90
91
92
93
# File 'ext/cglm/rb_cglm_mat4.c', line 86

VALUE rb_cglm_mat4_mul_vec3(int argc, VALUE *argv, VALUE self) {
  VALUE other, last, dest;
  rb_scan_args(argc, argv, "12", &other, &last, &dest);
  if (NIL_P(last)) last = DBL2NUM(1.0);
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
  glm_mat4_mulv3(VAL2MAT4(self), VAL2VEC3(other), NUM2FLT(last), VAL2VEC3(dest));
  return dest;
}