def clamp(n, vmin, vmax):
    """Computes the value of the first specified argument clamped to a range
    defined by the second and third specified arguments

    :param n: input Value
    :param vmin: MiniMum Value
    :param vmax: Maximum Value
    :returns: The clamped value of n
    """
    return max(min(n, vmax), vmin)