rust/integral-geometry/src/lib.rs
changeset 14129 36b792842d5b
parent 14128 6a3bcb7c2981
child 14133 f04bc39f0c05
equal deleted inserted replaced
14128:6a3bcb7c2981 14129:36b792842d5b
    60     }
    60     }
    61 
    61 
    62     #[inline]
    62     #[inline]
    63     pub fn rotate90(self) -> Self {
    63     pub fn rotate90(self) -> Self {
    64         Point::new(self.y, -self.x)
    64         Point::new(self.y, -self.x)
       
    65     }
       
    66 
       
    67     #[inline]
       
    68     pub fn cross(self, other: Point) -> i32 {
       
    69         self.dot(other.rotate90())
    65     }
    70     }
    66 }
    71 }
    67 
    72 
    68 #[derive(PartialEq, Eq, Clone, Copy, Debug)]
    73 #[derive(PartialEq, Eq, Clone, Copy, Debug)]
    69 pub struct Size {
    74 pub struct Size {