Class: CGLM::MatrixType

Inherits:
Base
  • Object
show all
Defined in:
lib/cglm/matrix_type.rb,
ext/cglm/rb_cglm.c

Direct Known Subclasses

Mat3, Mat4

Instance Attribute Summary

Attributes inherited from Base

#addr

Instance Method Summary collapse

Methods inherited from Base

#copy_to, #dup, #initialize, #initialize_dup

Constructor Details

This class inherits a constructor from CGLM::Base

Instance Method Details

#to_flat_aObject

Returns a flat array of floats, rather than the 2D array returned by

to_a. Equivalent to to_a.flatten, but more efficient.



5
6
7
8
# File 'lib/cglm/matrix_type.rb', line 5

def to_flat_a
  addr = self.addr
  addr[0, addr.size].unpack("F*")
end