I'm writing a program that needs to determine a variable (opacity) based on a linear function of time (milliseconds elapsed during the program).
Basically, over a period of 1000 milliseconds (end_time - start_time), I need to linearly calculate an integer (opacity) that goes from 255 to 0 (start_opacity to end_opacity).
What is this type of function called? Is it "linear regression?" "linear programming?" Can Wolfram Alpha create the function? I tried this (making my imaginary milliseconds being from 951 to 1951), but it's not quite what I want.
I want a function F to calculate the opacity based on these parameters:
opacity = F (start_opacity, end_opacity start_time, current_time, end_time)
What search terms will help me figure out how to do this?
(winning answer may also explain how to do it)