def clamp(value: float, minimum: float, maximum: float) -> float:
    """Clamp a value between two numbers

    Parameters
    ----------
    value
        The value to clamp
    minimum
        Minimum acceptable value
    maximum
        Maximum acceptable value

    Returns
    -------
    float
        The clamped value
    """

    return max(minimum, min(value, maximum))