def linstep(min, max, x):
    """Returns the value of a linear step function.

    Returns 0 if x < min, 1 if x > max, and performs a linear
    interpolation between 0 and 1 in the interval min to max.

    :rtype: float
    """
    if x<min:
        return 0.0
    if x>max:
        return 1.0
    return linmap(min, max, x)

# NOTE : x first seem more natural
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/util/mathutils.py/linstep/original