rust/integral-geometry/src/lib.rs
branchtransitional_engine
changeset 16032 31cc1e450273
parent 16027 d4675c190fa5
--- a/rust/integral-geometry/src/lib.rs	Wed Sep 04 14:54:34 2024 +0200
+++ b/rust/integral-geometry/src/lib.rs	Tue Sep 10 13:56:51 2024 +0200
@@ -61,6 +61,14 @@
     pub const fn rotate90(self) -> Self {
         Self::new(self.y, -self.x)
     }
+    #[inline]
+    pub const fn rotate180(self) -> Self {
+        Self::new(-self.x, -self.y)
+    }
+    #[inline]
+    pub const fn rotate270(self) -> Self {
+        Self::new(-self.y, self.x)
+    }
 
     #[inline]
     pub const fn cross(self, other: Point) -> i32 {