def clamp(start, size, max_size)
      start += shift_vector(start)
      start -= shift_vector(max_size - (start + size))
      start
    end
def clamp(start, size, max_size)
      start += shift_vector(start)
      start -= shift_vector(max_size - (start + size))
      start
    end
Clamps the rectangle defined by +start+ and +size+
 to fit inside 0, 0 and +max_size+. It is assumed
 that +size+ will always be smaller than +max_size+.

 Returns the start vector.