I have a kind of problem with a code that I'm writing, and can't come up with a way to solve it.
I have some values defining the speed that can go from $min$ to $max$. For example, the speed in this case can go from 0.2 to 400.
At the same time, I get input from the user which varies from $1$ to $100$.
What I'd like to do is connect these two data, in a way that given the input I can return the optimal speed. For example, is the input is the minimum, $1$, I want to return 0.2. If the input is $100$, I want to return $400$:
So, I need a mathematical formula to connect between input and correspondent speed. I don't know why but I tried a lot and this problem confuses me.
Thanks