• Clamp to the supported range and round to whole percentage points. Rounding matters because repeated ±0.1 steps accumulate float error (0.7 → 0.69999…), which would otherwise make equality checks like zoom === DEFAULT_ZOOM fail.

    Parameters

    • zoom: number

    Returns number