@atan2(x:numeric, y:numeric) ; listable

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

The atan2() function is used mostly to convert from rectangular (x,y) to polar (r, \theta) coordinates that must satisfy x = r \cos(\theta) and y = r \sin(\theta). In general, conversions to polar coordinates should be computed thus:

        $r := @sqrt($x*$x + $y*$y)
        $theta := @atan2($y, $x).

Mathematical Functions @abs,    @acos,    @asin,    @atan,    @atan2,    @between,    @ceil,    @clear,    @cos,    @cosh,    @exp,    @floor,    @log,    @log10,    @log2,    @max,    @min,    @pow,    @rand,    @rand_int,    @random,    @rnd_bernoulli,    @rnd_binomial,    @rnd_exponential,    @rnd_gamma,    @rnd_geometric,    @rnd_normal,    @rnd_uniform_float,    @rnd_uniform_int,    @round,    @sin,    @sinh,    @sqrt,    @tan