method

atan2

ruby latest stable - Class: CMath
atan2(y,x)
public

returns the arc tangent of y divided by x using the signs of y and x to determine the quadrant

CMath.atan2(1 + 1i, 0) #=> (1.5707963267948966+0.0i)