lib/ruby_on_rays/matrix4x4.rb
# Returns the product of a matrix with a scalar.
# @param other [Float]
# @return [Matrix4x4]
Returns the product of a matrix with a scalar.
Returns the product of a matrix with a scalar .
def mul_matrix_scalar(other)
      rm = Matrix4x4.new(@m)
      (0...4).each do |row|
        (0...4).each do |col|
          rm[row, col] *= other
        end
      end
      rm
    end
def mul_matrix_scalar ( other ) rm = Matrix4x4 . new ( @m ) ( 0 ... 4 ) . each do | row | ( 0 ... 4 ) . each do | col | rm [ row , col ] *= other end end rm end
Returns the product of a matrix with a scalar.
Returns the product of a matrix with a scalar .
None
Matrix4x4
other
<not_specific>
<not_specific>
None