cppreference.com > Standard C Math > atan2
atan2
Syntax:
  #include <math.h>
  double atan2( double y, double x );
  

The atan2() function computes the arc tangent of y/x, using the signs of the arguments to compute the quadrant of the return value.

Note the order of the arguments passed to this function.