maths.pythagoras ================ .. py:module:: maths.pythagoras .. autoapi-nested-parse:: Uses Pythagoras theorem to calculate the distance between two points in space. Classes ------- .. autoapisummary:: maths.pythagoras.Point Functions --------- .. autoapisummary:: maths.pythagoras.distance Module Contents --------------- .. py:class:: Point(x, y, z) .. py:method:: __repr__() -> str .. py:attribute:: x .. py:attribute:: y .. py:attribute:: z .. py:function:: distance(a: Point, b: Point) -> float >>> point1 = Point(2, -1, 7) >>> point2 = Point(1, -3, 5) >>> print(f"Distance from {point1} to {point2} is {distance(point1, point2)}") Distance from Point(2, -1, 7) to Point(1, -3, 5) is 3.0