atan2intermediate// Angle from positive x-axis to point (x, y)
Math.atan2(1, 1) // β 0.7853... (Ο/4)
Math.atan2(0, 1) // β 0Use Math.atan2(y, x) to compute the angle of a point from the origin, correctly handling all quadrants.
Math.atan2(-1, 0) returns -Math.PI / 2 (-90Β°, pointing down the y-axis).
Challenge: Verify that Math.atan2(-1, 0) equals -Ο/2.