JavaScript atan2() function not giving expected results
问题 Normally, polar coordinates go from 0 to π to 2 π (just before 2 π really, as it equals 0 again). However, when using the JavaScript atan2() function, I'm getting a different, weird range: Cartesian X | Cartesian Y | Theta (θ) =========================================================== 1 | 0 | 0 (0 × π ) 1 | 1 | 0.7853981633974483 (0.25 × π ) 0 | 1 | 1.5707963267948966 (0.5 × π ) -1 | 1 | 2.356194490192345 (0.75 × π ) -1 | 0 | 3.141592653589793 (1 × π ) -1 | -1 | -2.356194490192345 (-0.75 × π