equal
deleted
inserted
replaced
63 pub fn cross(self, other: Point) -> i32 { |
63 pub fn cross(self, other: Point) -> i32 { |
64 self.dot(other.rotate90()) |
64 self.dot(other.rotate90()) |
65 } |
65 } |
66 |
66 |
67 #[inline] |
67 #[inline] |
68 pub fn fit(&self, rect: &Rect) -> Point { |
68 pub fn fit(self, rect: &Rect) -> Point { |
69 let x = if self.x > rect.right() { |
69 let x = if self.x > rect.right() { |
70 rect.right() |
70 rect.right() |
71 } else if self.x < rect.left() { |
71 } else if self.x < rect.left() { |
72 rect.left() |
72 rect.left() |
73 } else { |
73 } else { |