Clean distance
This commit is contained in:
@@ -15,3 +15,6 @@ class Point3D:
|
||||
|
||||
def __repr__(self):
|
||||
return f"Point2D(x: {self.x}, y: {self.y}, z: {self.z})"
|
||||
|
||||
def distance(self, point: Type[Point3D]):
|
||||
return sqrt((point.x - self.x) ** 2 + (point.y - self.y) ** 2 + (point.z - self.z) ** 2)
|
||||
|
||||
Reference in New Issue
Block a user