def clean_cos(value):
    """
    Limits the a value between the range C{[-1, 1]}
    @type value: float
    @param value: The input value
    @rtype: float
    @return: The limited value in the range C{[-1, 1]}
    """
    return min(1, max(value, -1))