lib/vector2.rb
# call-seq:
#   move!( [x,y] )
#   move!( x,y )
#
# Moves the vector by the given x and y amounts.


Moves the vector by the given x and y amounts.
Moves the vector by the given x and y amounts .
def move!( x, y=nil )
    raise "can't modify frozen object" if frozen?
    if y.nil?
      a = x.to_ary
      @x += a[0]
      @y += a[1]
    else
      @x += x
      @y += y
    end
    @hash = nil
    self
  end
def move! ( x , y = nil ) raise "can't modify frozen object" if frozen? if y . nil? a = x . to_ary @x += a [ 0 ] @y += a [ 1 ] else @x += x @y += y end @hash = nil self end
call-seq:
move!
call - seq : move!
x
<not_specific>
y
<not_specific>