equal
deleted
inserted
replaced
58 } |
58 } |
59 |
59 |
60 #[inline] |
60 #[inline] |
61 pub const fn rotate90(self) -> Self { |
61 pub const fn rotate90(self) -> Self { |
62 Self::new(self.y, -self.x) |
62 Self::new(self.y, -self.x) |
|
63 } |
|
64 #[inline] |
|
65 pub const fn rotate180(self) -> Self { |
|
66 Self::new(-self.x, -self.y) |
|
67 } |
|
68 #[inline] |
|
69 pub const fn rotate270(self) -> Self { |
|
70 Self::new(-self.y, self.x) |
63 } |
71 } |
64 |
72 |
65 #[inline] |
73 #[inline] |
66 pub const fn cross(self, other: Point) -> i32 { |
74 pub const fn cross(self, other: Point) -> i32 { |
67 self.dot(other.rotate90()) |
75 self.dot(other.rotate90()) |