Method: CGLM::Vec3#lerp!

Defined in:
ext/cglm/rb_cglm_vec3.c

#lerp!(from, to, amount) ⇒ self

Performs linear interpolation between from and to, both of which should be Vec3's, by the specified amount which should be a number. Modifies self in-place and returns self.

Returns:

  • (self)


621
622
623
624
# File 'ext/cglm/rb_cglm_vec3.c', line 621

VALUE rb_cglm_vec3_lerp_self(VALUE self, VALUE from, VALUE to, VALUE amount) {
  glm_vec3_lerp(VAL2VEC3(from), VAL2VEC3(to), NUM2FLT(amount), VAL2VEC3(self));
  return self;
}