Notice that I'm definitely not an expert in math, and I'm going to use this function in a game for something connected to lights (however, is very math-specific, that's why I'm posting here and not on gamedev).
I need a function to "bind" every value between 3.5 and 70 to values between 0.5 and 1.5 Where 3.5 => 0.5 and 70 => 1.5. So for example the value 36.75 will be 1.0.
Also, if possible, I would like to change the first two values to have a different range and the other 2 values to a different range.
Are there any math function that satisfact what I'm asking (if exists)?
Sorry if it looks as an easy question for someone, but really I'm quite noob in math^^