Method: RMath3D::RMtx3#-

Defined in:
lib/rmath3d/rmath3d_plain.rb

#-(arg) ⇒ Object

call-seq: -

mtx1 - mtx2 : Binary minus operator.



1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
# File 'lib/rmath3d/rmath3d_plain.rb', line 1079

def -( arg )
  if ( arg.class != RMtx3 )
    raise TypeError, "RMtx3#-(arg) : Unknown type #{arg.class} given as RMtx3."
    return nil
  end

  result = RMtx3.new
  for row in 0...3 do
    for col in 0...3 do
      result.setElement( row, col, getElement(row,col) - arg.getElement(row,col) )
    end
  end

  return result
end