MoodleDocs says...
ATAN2: Arc tangent of two variables -- pass in two values like (x, y), and you'll get the atah(y/x), adjusted to the proper quadrant.
Checking the quadrant to see if it matches Excel's ATAN2... It looks to me like Excel's ATAN2(x,y) is Moodle ATAN2(y,x)...
rad2deg(atan2({x},{y}))
rad2deg(atan2((-4.0),3.0)) = -53.13
Correct answer : -53.13 inside limits of true value rad2deg(atan2({x},{y}))
Min: -53.661403377698 --- Max: -52.598801330614
This would have been 2nd quad in Excel
rad2deg(atan2({x},{y}))
rad2deg(atan2(2.1,(-7.6))) = 164.55
Correct answer : 164.55 inside limits of true value rad2deg(atan2({x},{y}))
Min: 162.90814679598 --- Max: 166.19922046863
This would have been 4th quad in Excel
I'd prefer matching Excel, but is Moodle docs wrong here?