Returns a Double specifying the arctangent of a number.
Syntax
Atn ( number )
The required numberargument is a Double or any valid numeric expression.
Remarks
The Atn function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.
The range of the result is pi/2 to pi/2 radians.
To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.
Note: Atn is the inverse trigonometric function of Tan, which takes an angle as its argument and returns the ratio of two sides of a right triangle. Do not confuse Atn with the cotangent, which is the simple inverse of a tangent (1/tangent).
Query example
Expression |
Results |
SELECT Atn(90) AS ArcTangent FROM ProductSales GROUP BY Atn(90); |
Returns the "ArcTangent" of the number argument (any numeric expression that expresses an angle in radians) and displays in the column ArcTangent. |
VBA example
Note: Examples that follow demonstrate the use of this function in a Visual Basic for Applications (VBA) module. For more information about working with VBA, select Developer Reference in the drop-down list next to Search and enter one or more terms in the search box.
This example uses the Atn function to calculate the value of pi.
Dim pi pi = 4 * Atn(1) ' Calculate the value of pi.