It's a shame you put this 'competition' on when I have very limited internet access.
So I'm a late entrant, I guess.
To calculate the magnitude of your vector:
Split the 0 to 180 degrees angle into 45 degree segments, and use an approximation that's good for 0 to 45 degrees.
Swap the X and R values over for 45 to 90 degrees, for example.
An approximation based on a parabola works well, amplitude errors of less than 1.03% can be achieved.
Summary:
Amplitude = x + 0.428676 * y2 / x
Alternatives are A = x + (3/7) y2 / x ... very good
and A = x + 110 y2 / ( 256 * x ) ... pretty good, maybe useful for computer maths.
Attached explanation:
So I'm a late entrant, I guess.
To calculate the magnitude of your vector:
Split the 0 to 180 degrees angle into 45 degree segments, and use an approximation that's good for 0 to 45 degrees.
Swap the X and R values over for 45 to 90 degrees, for example.
An approximation based on a parabola works well, amplitude errors of less than 1.03% can be achieved.
Summary:
Amplitude = x + 0.428676 * y2 / x
Alternatives are A = x + (3/7) y2 / x ... very good
and A = x + 110 y2 / ( 256 * x ) ... pretty good, maybe useful for computer maths.
Attached explanation:
Comment