rust/integral-geometry/src/lib.rs
branchtransitional_engine
changeset 16032 31cc1e450273
parent 16027 d4675c190fa5
equal deleted inserted replaced
16031:1b1d5729ff3e 16032:31cc1e450273
    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())