I've broken down everything that I can, I'm having trouble figuring out this calculation:
- Given I have a
MINnumber and aMAXnumber, withMIN<MAX - I have a number
X, whereMIN<=X<=MAX - Where
MINrepresents 0 on a scale - And
MAXrepresents 5 on a scale - I want to calculate the, what I'm calling scale number, of
Xwhere 0 <=X<= 5
I know that if:
X=MIN, the scale number would equal0X=MAXthe scale number would equal5
But I can't seem to wrap my head around this. Can someone point me in the right direction?
I'm not entirely sure what to tag this.
EDIT
My first attempts was:
Figure out the scale length say 0-5, where MIN = 0 and MAX = 5, so S = 5 Then figure out the steps, where (MAX-MIN)/(S-1), But that would really only be able to give me the ability to say if 1 <= X <= 2 OR 2 <= X <= 3 and so on.
It seems like I have to normalize the numbers of MIN and MAX to equal 0 and 5(scale size) respectively. Than figure out the calculation to put X between those 2 numbers.
If you want find the number $n$ that ''represents'' in the interval $[0,5]$ a given $x$ , in a directly proportional way than you have: $$ x:(Max-Min)=n:5 $$
find $n$ ...