equal
deleted
inserted
replaced
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 |