module Jiggle
  
  class Vector2
    def to_s
      "(#{x}, #{y})"
    end
    
    def inspect
      "#<Vector2 x=#{x} y=#{y}>"
    end

    alias :<=> :distance_to
  end
  
  def jgv(x, y)
    Vector2.new(x, y)
  end
end

module Jiggle
  
  class Vector2
    def to_s
      "(#{x}, #{y})"
    end
    
    def inspect
      "#<Vector2 x=#{x} y=#{y}>"
    end

    alias :<=> :distance_to

    def to_a
      [x, y]
    end
    alias :to_ary :to_a
  end
  
  def jgv(x, y)
    Vector2.new(x, y)
  end
end

Add converting to array stuff to Vector2 so it's nicer with Rubygame
Add converting to array stuff to Vector2 so it's nicer with Rubygame
