# File lib/rubygame/rect.rb, line 581 def union!(rect) self.normalize! rleft, rtop = self.topleft rright, rbottom = self.bottomright r2 = Rect.new_from_object(rect).normalize! rleft = [rleft, r2.left].min rtop = [rtop, r2.top].min rright = [rright, r2.right].max rbottom = [rbottom, r2.bottom].max self[0,4] = rleft, rtop, rright - rleft, rbottom - rtop return self end