I've been checking out a few answers (this and this) but I cannot come up with the result on my own.
Here is my problem:
I have a value from 0 to 100 that I need to express on a scale from -40 to 40.
Can someone please direct me to a proper formula?
I've been checking out a few answers (this and this) but I cannot come up with the result on my own.
Here is my problem:
I have a value from 0 to 100 that I need to express on a scale from -40 to 40.
Can someone please direct me to a proper formula?
You basically want toe formula for the straight line going through the points $(x_1,y_1)=(0,-40)$ and $(x_2,y_2)=(100,40)$. The formula for this is $$y-y_1=m(x-x_1)$$ where $$m=\frac{y_2-y_1}{x_2-x_1}$$
So in your example, this gives $$m=\frac{80}{100}=0.8\\y+40=0.8x\\y=0.8x-40$$Here, $x$ is your "percentage" value, and $y$ gives you the corresponding value on the scale from $-40$ to $40$.
A somewhat different way of looking at it. You want to change from a scale that has a range of $100$ to a scale that has a range of $80$, so multiply by $.8$. Then you want to move the origin of the scale from $0$ to $-40$, so subtract $40$. This gives $$y=.8x-40.$$
This works so simply because the original origin is $0$ and it doesn't change when you multiply by $.8.$ If the original scale ran from $20$ to $120$, we would still multiply by $.8$, but now the origin would have moved to $16$, so we would subtract $56$, not $60.$