Method: GuiGeo::Rectangle#union

Defined in:
lib/gui_geometry/rectangle.rb

#union(b) ⇒ Object Also known as: &



99
100
101
102
103
104
# File 'lib/gui_geometry/rectangle.rb', line 99

def union(b)
  return clone unless b
  l = loc.min(b.loc)
  s = br.max(b.br) - l
  rect l, s
end