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) -> Point2D
Return the midpoint between this point and other.
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) -> float
Return the angle in degrees from this point toward other.
with_x
with_x(x: float) -> Point2D
Return a copy with x replaced.
with_y
with_y(y: float) -> Point2D
Return a copy with y replaced.