branch | transitional_engine |
changeset 16061 | 31cc1e450273 |
parent 16056 | d4675c190fa5 |
child 16068 | a236360669cc |
--- 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 {