Calculate Euclidean distance between two points. >>> Point(0, 0).euclidean_distance(Point(3, 4)) 5.0 >>> Point(1, 1).euclidean_distance(Point(4, 5)) 5.0
(self, other: Point)
| 78 | return self.y < other.y |
| 79 | |
| 80 | def euclidean_distance(self, other: Point) -> float: |
| 81 | """ |
| 82 | Calculate Euclidean distance between two points. |
| 83 | |
| 84 | >>> Point(0, 0).euclidean_distance(Point(3, 4)) |
| 85 | 5.0 |
| 86 | >>> Point(1, 1).euclidean_distance(Point(4, 5)) |
| 87 | 5.0 |
| 88 | """ |
| 89 | return ((self.x - other.x) ** 2 + (self.y - other.y) ** 2) ** 0.5 |
| 90 | |
| 91 | def consecutive_orientation(self, point_a: Point, point_b: Point) -> float: |
| 92 | """ |
no outgoing calls