rust/integral-geometry/src/lib.rs
changeset 15286 16bd389fc735
parent 15215 13041ae61ac5
child 15384 1c6d5656157c
equal deleted inserted replaced
15285:6382a14c9e83 15286:16bd389fc735
   168     }
   168     }
   169 
   169 
   170     #[inline]
   170     #[inline]
   171     pub fn contains(&self, other: Self) -> bool {
   171     pub fn contains(&self, other: Self) -> bool {
   172         self.width >= other.width && self.height >= other.height
   172         self.width >= other.width && self.height >= other.height
       
   173     }
       
   174 
       
   175     #[inline]
       
   176     pub fn join(&self, other: Self) -> Self {
       
   177         Self {
       
   178             width: max(self.width, other.width),
       
   179             height: max(self.height, other.height)
       
   180         }
   173     }
   181     }
   174 }
   182 }
   175 
   183 
   176 #[derive(PartialEq, Eq, Clone, Copy, Debug)]
   184 #[derive(PartialEq, Eq, Clone, Copy, Debug)]
   177 pub struct SizeMask {
   185 pub struct SizeMask {