Class: CGLM::MatrixType
- Defined in:
- lib/cglm/matrix_type.rb,
ext/cglm/rb_cglm.c
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#to_flat_a ⇒ Object
Returns a flat array of floats, rather than the 2D array returned by #to_a.
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_a ⇒ Object
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 |