Hi,
That's not quite right Halo.
What you need to do is look at the sign of the 2 arguments to work out which 'quadrant' the 2d vector is pointing into.
You then adjust the result of Atan correspondingly.
The problem with plain Atan is that it only has one 'sign' to go on.
That's not quite right Halo.
What you need to do is look at the sign of the 2 arguments to work out which 'quadrant' the 2d vector is pointing into.
You then adjust the result of Atan correspondingly.
The problem with plain Atan is that it only has one 'sign' to go on.