atan2

Declaration

double* function atan2(double* Y,double* X)

Description

atan2 returns the arc tangent of Y/X. where X and Y cannot both be equal to zero. Atan2 returns a value between -pi and pi.

Example Stored Procedure

CREATE PROCEDURE test_atan2 (X DOUBLE PRECISION, Y INTEGER)

RETURNS (result DOUBLE PRECISION) AS

BEGIN

result = atan2(X, Y);

END!!

WISQL - calling the example stored procedure

execute procedure test_atan2(1,2);

RESULT

======================

0.4636476090008061

execute procedure test_atan2(4,2);

RESULT

======================

1.10714871779409

execute procedure test_atan2(-4,2);

RESULT

======================

-1.10714871779409

execute procedure test_atan2(-4.2,2.2);

RESULT

======================

-1.08828303177242

Error Results - restrictions on X and Y are : X !=0.0 && Y != 0.0

execute procedure test_atan2(-0,0);

RESULT

======================

-999999