rust/integral-geometry/src/lib.rs
changeset 14731 75ff5c643004
parent 14730 19d30d96d7d6
child 15030 dc4a12a84c92
equal deleted inserted replaced
14730:19d30d96d7d6 14731:75ff5c643004
   432         self.contains(other.top_left()) && self.contains(other.bottom_right())
   432         self.contains(other.top_left()) && self.contains(other.bottom_right())
   433     }
   433     }
   434 
   434 
   435     #[inline]
   435     #[inline]
   436     pub fn intersects(&self, other: &Rect) -> bool {
   436     pub fn intersects(&self, other: &Rect) -> bool {
   437         self.left() <= self.right()
   437         self.left() <= other.right()
   438             && self.right() >= other.left()
   438             && self.right() >= other.left()
   439             && self.top() <= other.bottom()
   439             && self.top() <= other.bottom()
   440             && self.bottom() >= other.top()
   440             && self.bottom() >= other.top()
   441     }
   441     }
   442 
   442