I have a variable x in the interval [-30; 30]. I need to convert this interval so x would be in the interval [0; 1]. What I mean is like this:
original x: -30 .. -20 ... -10 .... 0 .... 10 .... 20 ... 30
new x: 0 .. 0.16 .. 0.32 .. 0.5 .. 0.66 .. 0.83 .. 1
New x values correspond to the original x values. I hope you get the idea.