equal
deleted
inserted
replaced
96 pub fn cotangent_mul(self, y: i32) -> i32 { |
96 pub fn cotangent_mul(self, y: i32) -> i32 { |
97 y * self.x / self.y |
97 y * self.x / self.y |
98 } |
98 } |
99 |
99 |
100 #[inline] |
100 #[inline] |
101 pub fn to_fppoint(&self) -> FPPoint { |
101 pub fn to_fppoint(self) -> FPPoint { |
102 FPPoint::new(self.x.into(), self.y.into()) |
102 FPPoint::new(self.x.into(), self.y.into()) |
|
103 } |
|
104 |
|
105 #[inline] |
|
106 pub fn from_fppoint(p: &FPPoint) -> Self { |
|
107 Self::new(p.x().round(), p.y().round()) |
103 } |
108 } |
104 } |
109 } |
105 |
110 |
106 #[derive(PartialEq, Eq, Clone, Copy, Debug)] |
111 #[derive(PartialEq, Eq, Clone, Copy, Debug)] |
107 pub struct Size { |
112 pub struct Size { |