If it's linear, you can use the following formula to allow for any minimum and maximum:
from_min = -1.3
from_max = 1.7
to_min = 40
to_max = 99
from = <whatever value you want to convert>
to = (from - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
The * (to_max - to_min) / (from_max - from_min)
bit scales the range from the from
range to the to
range. Subtracting from_min
before and adding to_min
after locates the correct point within the to
range.
Examples, first the original:
(1.3..1.7) -> (40..99)
to = (from - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
= (from - 1.3) * 59 / 0.4 + 40
= (from - 1.3) * 147.5 + 40 (same as Ignacio)
= from * 147.5 - 151.75 (same as Zebediah using expansion)
Then the one using -1.3 as the lower bound as mentioned in one of your comments:
(-1.3..1.7) -> (40..99)
to = (from - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
= (from - -1.3) * 59 / 3 + 40
= (from + 1.3) * 19.67 + 40
This answer (and all the others to date of course) assume that it is a linear function. That's by no means clear based on your use of words like "arc" and "knob" in the question. You may need some trigonometry (sines, cosines and such) if it turns out linear doesn't suffice.