23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ATAN2<br />

78<br />

ATAN takes the ratio (expression) of two sides of a right triangle and returns the corresponding<br />

angle. The ratio is the length of the side opposite the angle divided by the length of the side<br />

adjacent to the angle.<br />

The result is expressed in radians and is in the range -Pi/2 to Pi/2 radians. To convert degrees to<br />

radians, multiply degrees by Pi/180. To convert radians to degrees, multiply radians by 180/Pi.<br />

Notes • The expression must be in the range -1 to 1.<br />

ATAN2<br />

Syntax<br />

select atan (1) * (180/ pi()) 'Arctangent in degrees' from syscalctable;<br />

ARCTANGENT IN DEGREES<br />

-----------------------<br />

45.000000000000000<br />

1 record selected<br />

select atan (1) 'Arctangent in radians' from syscalctable;<br />

ARCTANGENT IN RADIANS<br />

-----------------------<br />

0.785398163397448<br />

1 record selected<br />

• The expression must evaluate to an approximate numeric data type.<br />

Compatibility<br />

ODBC compatible<br />

Returns the arctangent of the x and y coordinates specified by expression1 and expression2.<br />

ATAN2 ( expression1 , expression2 )<br />

Example The following example illustrates two ways to use the ATAN2 function:

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

Saved successfully!

Ooh no, something went wrong!