def relative(x, y)
      if x.respond_to?(:to_i) && y.respond_to?(:to_i)
        [@x.min + x.to_i, @y.min + y.to_i]
      else
        x, y = rangeize(x, y)
        [ (@x.min + x.min)..(@x.min + x.max),
          (@y.min + y.min)..(@y.min + y.max) ]
      end
    end
def relative(x, y)
      if x.respond_to?(:to_i) && y.respond_to?(:to_i)
        [@x.min + x.to_i, @y.min + y.to_i]
      else
        x, y = rangeize(x, y)
        [ (@x.min + x.min)..(@x.min + x.max),
          (@y.min + y.min)..(@y.min + y.max) ]
      end
    end
Converts coordinates to coordinates relative to inside the map.