Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateInternal functions → ATAN2()
Firebird Home Firebird Home Prev: ATAN()Firebird Documentation IndexUp: Internal functionsNext: BIN_AND()

ATAN2()

Available in: DSQL, PSQL

Added in: 2.1

Description: Returns the angle whose sine-to-cosine ratio is given by the two arguments, and whose sine and cosine signs correspond to the signs of the arguments. This allows results across the entire circle, including the angles -π/2 and π/2.

Result type: DOUBLE PRECISION

Syntax: 

ATAN2 (y, x)
  • The result is an angle in the range [-π, π].

  • If x is negative, the result is π if y is 0, and -π if y is -0.

  • If both y and x are 0, the result is meaningless.

Important

If the external function ATAN2 is declared in your database, it will override the internal function. To make the internal function available, DROP or ALTER the external function (UDF).

Notes: 

Prev: ATAN()Firebird Documentation IndexUp: Internal functionsNext: BIN_AND()
Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateInternal functions → ATAN2()