Table of contents
Collapse the table of content
Expand the table of content

Atn Function

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Returns a Double specifying the arctangent of a number. SyntaxAtn(number) The required numberargument is aDouble or any validnumeric 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.

NoteAtn 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).


This example uses the Atn function to calculate the value of pi.

Dim IntVar, StrVar, DateVar, MyCheck
' Initialize variables.
IntVar = 459: StrVar = "Hello World": DateVar = #2/12/69# 
MyCheck = VarType(IntVar)    ' Returns 2.
MyCheck = VarType(DateVar)    ' Returns 7.
MyCheck = VarType(StrVar)    ' Returns 8.

© 2018 Microsoft