from __future__ import annotations

from collections.abc import Iterable, Sequence
from typing import Any

__all__: tuple[str, ...]

def clamp(x: float, a: float, b: float) -> float: ...
def clamp01(x: float) -> float: ...
def within_range(val: float, lower: float, upper: float, tol: float = ...) -> bool: ...
def similarity_abs(a: float, b: float, lo: float, hi: float) -> float: ...
def kahan_sum_nd(values: Iterable[Sequence[float]], dims: int) -> tuple[float, ...]: ...
def angle_diff(a: float, b: float) -> float: ...
def angle_diff_array(
    a: Sequence[float] | Any,
    b: Sequence[float] | Any,
    *,
    np: Any,
    out: Any | None = ...,
    where: Any | None = ...,
) -> Any: ...
