Public Member Functions | |
| __init__ (self, Union[int, float] x, Union[int, float] y) | |
| Initializes a Point instance. | |
| bool | __eq__ (self, Any other) |
| Determines if this point is equal to another point or coordinate pair. | |
| bool | __ne__ (self, Any other) |
| Determines if this point is not equal to another point or coordinate pair. | |
| str | __str__ (self) |
| Returns a string representation of the Point. | |
| str | __repr__ (self) |
| Return an unambiguous string of the Point object. | |
| Union[int, float] | x (self) |
| Union[int, float] | y (self) |
Data Fields | |
| x = 2: | |
| y | |
Protected Attributes | |
| Union[int, float] | _x = x |
| Union[int, float] | _y = y |
Represents a point in 2D space with x and y coordinates.
| __init__ | ( | self, | |
| Union[int, float] | x, | ||
| Union[int, float] | y ) |
Initializes a Point instance.
| x | x coordinate |
| y | y coordinate |
| bool __eq__ | ( | self, | |
| Any | other ) |
Determines if this point is equal to another point or coordinate pair.
| other | Another Point object OR List of coordinates [x,y] OR Tuple of coordinates (x,y) |
| bool __ne__ | ( | self, | |
| Any | other ) |
Determines if this point is not equal to another point or coordinate pair.
| other | Another Point instance, or a list/tuple with two numeric elements [x, y] or (x, y). |
| str __repr__ | ( | self | ) |
Return an unambiguous string of the Point object.
| str __str__ | ( | self | ) |
Returns a string representation of the Point.
A string in the format "(x: <x_value>, y: <y_value>)".
| Union[int, float] x | ( | self | ) |
| Union[int, float] y | ( | self | ) |
|
protected |
|
protected |
| x = 2: |
| y |