Method: Geometry::Transformation#-

Defined in:
lib/geometry/transformation.rb

#-(other) ⇒ Object



101
102
103
104
105
106
107
108
109
# File 'lib/geometry/transformation.rb', line 101

def -(other)
    if other.is_a?(Array) or other.is_a?(Vector)
  if @translation
      Transformation.new(@translation-other, @rotation, @scale)
  else
      Transformation.new(other.map {|e| -e}, @rotation, @scale)
  end
    end
end