I\'m developing an indie video game, and have been operating under the assumption that because the thumbstick on my controller has a circular range of motion, it returns \"c
Divide each value by the magnitude to normalize all values to a unit vector, e.g.
magn = sqrt(x * x + y * y);
newx = magn > 1.0 ? x / magn : x;
newy = magn > 1.0 ? y / magn : y;
However, this may have the effect of clipping the magnitude instead of normalizing for the interior values.. That is, you'll get the same value for a controller pushed "fully" into the upper-left and a controller almost pushed fully into the same direction.