Method: CGLM::Vec3#muladd_scalar

Defined in:
ext/cglm/rb_cglm_vec3.c

#muladd_scalar(other, dest) ⇒ Object

Multiplies self with other and adds that result to dest. Equivalent to dest += (self * other). Returns dest.

  • other is a Numeric, not a vector type.

  • dest is not optional for this method, as it is for most others.



350
351
352
353
# File 'ext/cglm/rb_cglm_vec3.c', line 350

VALUE rb_cglm_vec3_muladd_scalar(VALUE self, VALUE other, VALUE dest) {
  glm_vec3_muladds(VAL2VEC3(self), NUM2FLT(other), VAL2VEC3(dest));
  return dest;
}