Remaping values?

Hi,

Is there a way to remap values? What I mean is:

Let’s say we have a y var that goes from 0 to 360. I want to “reamap” this into a new var that range from say 0 to 1. So that 0 of the y value is equal to 0 of the remapy value and 360 of the y value is equal to 1 of remapy. Even better, able to remap to -1 to +1?

Thanks for any advice and help on that.

1 Answer

1

Map to (0,1):

x = y/360;

Map to (-1,1):

x = y/180 -1;

....Sometimes I try to go from Greece to England by passing through Japan. Thanks Piflik