Method: CGLM::Mat4#rotate!

Defined in:
ext/cglm/rb_cglm_affine.c

#rotate!(axis, angle) ⇒ self

Returns:

  • (self)


228
229
230
231
232
233
234
235
# File 'ext/cglm/rb_cglm_affine.c', line 228

VALUE rb_cglm_rotate_self(VALUE self, VALUE axis, VALUE angle) {
  mat4 *mat;
  vec3 *vec;
  mat = &VAL2MAT4(self);
  vec = &VAL2VEC3(axis);
  glm_rotate(*mat, (float) NUM2DBL(angle), *vec);
  return self;
}