I have a range of number that are coming in from 0 - 1 for example: 0.178 0.45 0.89 0.41
The highest they can go is 1.0
I would like to convert these into a scale going from 1 - 180
So if the number that came in was 0.5
|
I have a range of number that are coming in from 0 - 1 for example: 0.178 0.45 0.89 0.41 The highest they can go is 1.0 I would like to convert these into a scale going from 1 - 180 So if the number that came in was 0.5 |
|||||
|
|
In general, you are looking for an affine transformation of the variable $0 \le x \le 1$ to some other domain $a \le y \le b$. The general form of this is $$y = (b-a)x + a$$ In your case, $b = 180$, $a = 1$, so you get, as Joshua said in his comment, $$y = 179x+1.$$ This works for all $b > a$, but if you have $x$ defined in some other interval, you have to be more careful! |
|||
|
|