Oh and then if you want to only fade out, change the first 0 in the 3rd line of code to 100 so that no matter what the fadeInTime is, it will remap the value to 100-100 so no change, just opaque.
Math.min(linear(time,inPoint,inPoint + fadeInTime,100,100),linear(time,outPoint – fadeOutTime,outPoint,100,0))