def ClampValue(input, min, max):
    """
    Clamp Value to min/max
    :param input: Input
    :param min: Minimum Value
    :param max: Maximum Value
    :return: Clamped Output
    """
    if input > max:
        return max

    elif input < min:
        return min

    else:
        return input