Method: Autocad::BoundingBox.centered

Defined in:
lib/autocad/bounding_box.rb

.centered(width, height) ⇒ Object

Create a BoundingBox with the given width and height and the origin centered within the box.



18
19
20
21
22
# File 'lib/autocad/bounding_box.rb', line 18

def centered(width, height)
  w = width / 2.0
  h = height / 2.0
  new(-w, h, w, -h)
end