Point2D

A single point in 2D space (immutable and memory efficient).

Constructor

Point2D(x: float = 0, y: float = 0) -> None

Methods

center_to

center_to(other: Point2D)

distance_to

distance_to(other: Point2D) -> float

Calculate Euclidean distance to another point using math.hypot.

lerp

lerp(p2: Point2D, t: float) -> Point2D

Linear interpolation between two points (returns a NEW point)

rotation_to

rotation_to(other: Point2D)

with_x

with_x(x)

with_y

with_y(y)