# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405

import builtins
import typing
__all__ = [
    "Interpolation",
    "point_in_valid_area",
    "rotate",
]

@typing.final
class Interpolation:
    r"""
    Bracket of error values for adaptive-stepping interpolation.
    
    Maintains a min/max bracket around the target cut-area per distance
    and linearly interpolates to find the steering angle that achieves it.
    """
    def __new__(cls) -> Interpolation:
        r"""
        Create a new empty bracket with default angle bounds (-π/4, +π/4).
        """
    def min_angle(self) -> builtins.float:
        r"""
        Minimum steering angle: -π/4.
        """
    def max_angle(self) -> builtins.float:
        r"""
        Maximum steering angle: +π/4.
        """
    def joint_is_valid(self) -> builtins.bool:
        r"""
        Whether a valid bracket around the root exists
        (min.error < 0 <= max.error).
        """
    def has_pos(self, pos: tuple[builtins.float, builtins.float]) -> builtins.bool:
        r"""
        Whether either endpoint was sampled at *pos*.
        """
    def clamp_angle(self, angle: builtins.float, max_deflection: builtins.float) -> builtins.float:
        r"""
        Clamp *angle* to ±max_deflection.
        """
    def interpolate(self) -> builtins.float:
        r"""
        Linearly interpolate between min and max to find the angle
        where error = 0, clamped to [0.2, 0.8] in parameter space.
        """
    def add(self, error: builtins.float, angle: builtins.float, pos: tuple[builtins.float, builtins.float]) -> None:
        r"""
        Add a new sample to the bracket.
        
        Maintains the invariant ``min.error <= max.error`` and keeps
        samples closest to zero on each side of the root.
        """
    def __repr__(self) -> builtins.str: ...

def point_in_valid_area(pt: tuple[builtins.float, builtins.float], area: typing.Sequence[typing.Sequence[tuple[builtins.float, builtins.float]]]) -> builtins.bool:
    r"""
    Check whether *pt* lies in a valid tool area defined by polygon
    shells and holes.
    
    CCW-wound polygons are outer shells; CW-wound polygons are holes.
    A point is valid iff it is inside at least one CCW polygon AND
    outside all CW polygons.
    
    :param pt: Query point ``(x, y)``.
    :param area: List of polygon rings (each a list of ``(x, y)`` tuples).
    :returns: ``True`` if the point is in a valid region.
    """

def rotate(v: tuple[builtins.float, builtins.float], angle: builtins.float) -> tuple[builtins.float, builtins.float]:
    r"""
    Rotate a 2D vector by *angle* radians.
    
    :param v: Vector ``(x, y)``.
    :param angle: Rotation angle in radians.
    :returns: Rotated vector ``(x', y')``.
    """

