atan2
- calculates arctangent of y/x

Math functions
(AmiBroker 4.90)


SYNTAX atan2( y, x )
RETURNS NUMBER or ARRAY
FUNCTION atan2 returns the arctangent of y/x. If x is 0, atan2 returns 0. If both parameters of atan2 are 0, the function returns 0. atan2 returns a value in the range -PI to +PI radians, using the signs of both parameters to determine the quadrant of the return value.
EXAMPLE ffc = FFT(data,Len);
for( i = 0; i < Len - 1; i = i + 2 )
{
   amp[ i ] = amp[ i +
1 ] = sqrt(ffc[ i ]^ 2  +  ffc[ i + 1 ]^2);  
   phase[ i ] = phase[ i +
1 ] = atan2( ffc[ i + 1], ffc[ i ] );
}
SEE ALSO atan() function

References:

The atan2 function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.