(self, other: Point)
| 130 | return np.sqrt(self.x**2 + self.y**2) |
| 131 | |
| 132 | def cos(self, other: Point) -> float: |
| 133 | x, y = self.x, self.y |
| 134 | a, b = other.x, other.y |
| 135 | return (x * a + y * b) / self.norm() / other.norm() |
| 136 | |
| 137 | def dot(self, other: Point) -> float: |
| 138 | return self.x * other.x + self.y * other.y |