rust/integral-geometry/src/lib.rs
branchtransitional_engine
changeset 15918 9bd828451d77
parent 15828 44b49f255e31
equal deleted inserted replaced
15917:60b5639cc3a5 15918:9bd828451d77
   159     }
   159     }
   160 
   160 
   161     #[inline]
   161     #[inline]
   162     pub fn to_square(&self) -> Self {
   162     pub fn to_square(&self) -> Self {
   163         Self::square(max(self.width, self.height))
   163         Self::square(max(self.width, self.height))
       
   164     }
       
   165 
       
   166     #[inline]
       
   167     pub fn is_square(&self) -> bool {
       
   168         self.width == self.height
   164     }
   169     }
   165 
   170 
   166     #[inline]
   171     #[inline]
   167     pub const fn contains(&self, other: Self) -> bool {
   172     pub const fn contains(&self, other: Self) -> bool {
   168         self.width >= other.width && self.height >= other.height
   173         self.width >= other.width && self.height >= other.height