rust/integral-geometry/src/lib.rs
branchtransitional_engine
changeset 15918 9bd828451d77
parent 15828 44b49f255e31
--- a/rust/integral-geometry/src/lib.rs	Fri Feb 03 15:59:18 2023 +0100
+++ b/rust/integral-geometry/src/lib.rs	Sun Feb 12 14:19:02 2023 +0100
@@ -164,6 +164,11 @@
     }
 
     #[inline]
+    pub fn is_square(&self) -> bool {
+        self.width == self.height
+    }
+
+    #[inline]
     pub const fn contains(&self, other: Self) -> bool {
         self.width >= other.width && self.height >= other.height
     }