rust/integral-geometry/src/lib.rs
changeset 14117 f04bc39f0c05
parent 14113 36b792842d5b
child 14129 6e0be42d0a8f
equal deleted inserted replaced
14116:269f13ac670d 14117:f04bc39f0c05
   352     pub fn split_at(&self, point: Point) -> [Rect; 4] {
   352     pub fn split_at(&self, point: Point) -> [Rect; 4] {
   353         assert!(self.contains_inside(point));
   353         assert!(self.contains_inside(point));
   354         [
   354         [
   355             Rect::from_box(self.left(), point.x, self.top(), point.y),
   355             Rect::from_box(self.left(), point.x, self.top(), point.y),
   356             Rect::from_box(point.x, self.right(), self.top(), point.y),
   356             Rect::from_box(point.x, self.right(), self.top(), point.y),
   357             Rect::from_box(self.left(), point.x, point.y, self.bottom()),
   357             Rect::from_box(point.x, self.right(), point.y, self.bottom()),
   358             Rect::from_box(point.x, self.right(), point.y, self.bottom())
   358             Rect::from_box(self.left(), point.x, point.y, self.bottom())
   359         ]
   359         ]
   360     }
   360     }
   361 }
   361 }
   362 
   362 
   363 pub struct Polygon {
   363 pub struct Polygon {