lib/ruby_on_rays/matrix4x4.rb
# Yields the values of the elements along with the row and the column.
# @yieldparam value [Float]
# @yieldparam row [Integer] (0..3)
# @yieldparam col [Integer] (0..3)
# @return [Enumerator<each_with_indices>] if no block is given.
# @return [self] if a block is given.
Yields the values of the elements along with the row and the column.
Yields the values of the elements along with the row and the column .
def each_with_indices
      return enum_for(:each_with_indices) { 16 } unless block_given?
      (0...4).each do |row|
        (0...4).each do |col|
          yield @m[col + 4 * row], row, col
        end
      end
      self
    end
def each_with_indices return enum_for ( :each_with_indices ) { 16 } unless block_given? ( 0 ... 4 ) . each do | row | ( 0 ... 4 ) . each do | col | yield @m [ col + 4 * row ] , row , col end end self end
Yields the values of the elements along with the row and the column.
Yields the values of the elements along with the row and the column .
if no block is given.
if no block is given .
Enumerator<each_with_indices>
if a block is given.
if a block is given .
self
<not_specific>
None
row
<not_specific>
None
col
<not_specific>
None