## SlottedPoint


A 2D point using **slots** for memory efficiency.


Usage


``` python
SlottedPoint(
    x,
    y,
    label="",
)
```


## Parameters


`x: float`  
X coordinate.

`y: float`  
Y coordinate.

`label: str = ``""`  
Optional label for the point.


## Methods

| Name | Description |
|----|----|
| [__repr__()](#__repr__) | Return string representation. |
| [as_tuple()](#as_tuple) | Return coordinates as tuple. |
| [distance_to()](#distance_to) | Calculate distance to another point. |
| [translate()](#translate) | Return a new point translated by (dx, dy). |

------------------------------------------------------------------------


#### \_\_repr\_\_()


Return string representation.


Usage


``` python
__repr__()
```


------------------------------------------------------------------------


#### as_tuple()


Return coordinates as tuple.


Usage


``` python
as_tuple()
```


##### Returns


`tuple`  
(x, y) tuple.


------------------------------------------------------------------------


#### distance_to()


Calculate distance to another point.


Usage


``` python
distance_to(other)
```


##### Parameters


`other: SlottedPoint`  
The other point.


##### Returns


`float`  
Euclidean distance.


------------------------------------------------------------------------


#### translate()


Return a new point translated by (dx, dy).


Usage


``` python
translate(dx, dy)
```


##### Parameters


`dx: float`  
X offset.

`dy: float`  
Y offset.


##### Returns


`SlottedPoint`  
New translated point.
