MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

geometry/graham_scan.py:41–50  ·  view source on GitHub ↗

Initialize a 2D point. Args: x_coordinate: The x-coordinate (horizontal position) of the point y_coordinate: The y-coordinate (vertical position) of the point

(self, x_coordinate: float, y_coordinate: float)

Source from the content-addressed store, hash-verified

39 y: float
40
41 def __init__(self, x_coordinate: float, y_coordinate: float) -> None:
42 """
43 Initialize a 2D point.
44
45 Args:
46 x_coordinate: The x-coordinate (horizontal position) of the point
47 y_coordinate: The y-coordinate (vertical position) of the point
48 """
49 self.x = float(x_coordinate)
50 self.y = float(y_coordinate)
51
52 def __eq__(self, other: object) -> bool:
53 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected