21.10.2013 Views

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Important<br />

Internal functions<br />

If the external function ATAN is declared in your database, it will override the internal function. To make the<br />

internal function available, DROP or ALTER the external function (UDF).<br />

Available in: DSQL, PSQL<br />

Added in: <strong>2.1</strong><br />

ATAN2()<br />

Description: Returns the angle whose sine-to-cosine ratio is given by the two arguments, and whose sine and<br />

cosine signs correspond to the signs of the arguments. This allows results across the entire circle, including the<br />

angles -#/2 and #/2.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

Notes:<br />

ATAN2 (y, x)<br />

• The result is an angle in the range [-#, #].<br />

• If x is negative, the result is # if y is 0, and -# if y is -0.<br />

• If both y and x are 0, the result is meaningless.<br />

Important<br />

If the external function ATAN2 is declared in your database, it will override the internal function. To make the<br />

internal function available, DROP or ALTER the external function (UDF).<br />

• A fully equivalent description of this function is the following: ATAN2(y, x) is the angle between the positive<br />

X-axis and the line from the origin to the point (x, y). This also makes it obvious that ATAN2(0, 0) is<br />

undefined.<br />

• If x is greater than 0, ATAN2(y, x) is the same as ATAN(y/x).<br />

• If both sine and cosine of the angle are already known, ATAN2(sin, cos) gives the angle.<br />

Available in: DSQL, PSQL<br />

Added in: <strong>2.1</strong><br />

BIN_AND()<br />

Description: Returns the result of the bitwise AND operation on the argument(s).<br />

126

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!