TITLE: How do I find the value in a range based on the value in another range?
QUESTION [0 upvotes]: For example
Range1 = 0.6 to 0.7
Range2 = 0.0 to 0.5
When Range1 = 0.6(min) Range2 = 0.5(max) 
Inversely when Range1 = 0.7(max) Range2 = 0.0(min)
So lets say the value of Range1 = 0.65, how do I get the value of Range2 from that in the computational simplest way?

REPLY [0 votes]: Figure out what percentage of the way from $0.7$ to $0.6$ your R1 value is, $$\frac{0.7-x}{0.1}$$
Then multiply that percentage by 0.5 and that's your value you're after.  So the full formula would be $$\frac{0.7-x}{0.1}\times0.5$$
Note that there is an implied addition to $0.0$ as the final step, in case you are looking into generalizing to other ranges.  And the $0.5$ value comes from $0.5-0.0$ and not just from the max value alone of Range2.
Also, this assumes the relationship is linear.
{"set_name": "stack_exchange", "score": 0, "question_id": 1212281}