Math.atan vs Math.atan2

Please drag the orange point.

0deg

Math.atan (in degs) : 0.00

Math.atan2 (in degs): 0.00

var deltaX = m.x - cx; 0.00

var deltaY = m.y - cy; 0.00

where m is the mouse position
and cx and cy are the coords of the center