Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

ATN2 (Transact-SQL)

Returns the angle, in radians, between the positive x-axis and the ray from the origin to the point (y, x), where x and y are the values of the two specified float expressions.

Topic link icon Transact-SQL Syntax Conventions

ATN2 ( float_expression , float_expression )


Is an expression of the float data type.

The following example calculates the ATN2 for the specified x and y components.

DECLARE @x float
DECLARE @y float
SET @x = 35.175643
SET @y = 129.44
SELECT 'The ATN2 of the angle is: ' + CONVERT(varchar,ATN2(@x,@y ))

Here is the result set.

The ATN2 of the angle is: 0.265345                       

(1 row(s) affected)

Release History

14 April 2006

Changed content:
  • Corrected the definition of this function.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft