# Atn Function

Atn on trigonometrinen funktio, joka palauttaa numeerisen lausekkeen arkustangentin. Palautusarvo on vĂ€lillĂ€ -pii/2 ... +pii/2.

The arctangent is the inverse of the tangent function. The Atn Function returns the angle "Alpha", expressed in radians, using the tangent of this angle. The function can also return the angle "Alpha" by comparing the ratio of the length of the side that is opposite of the angle to the length of the side that is adjacent to the angle in a right-angled triangle.

Atn(side opposite the angle/side adjacent to angle)= Alpha

### Syntaksi:

``````
Atn (Number As Double) As Double
``````

Double

### Parametrit:

Number: Any numerical expression that represents the ratio of two sides of a right triangle. The Atn function returns the corresponding angle in radians (arctangent).

Pi is here the fixed circle constant with the rounded value 3.14159. Pi is a Basic mathematical constant.

### Virhekoodit:

5 Virheellinen proseduurikutsu

### Esimerkki:

``````
' TĂ€mĂ€ esimerkki laskee suorakulmaisesta kolmiosta...
' ... kulman alfa sen tangentista:
Sub ExampleAtn
' Pi = 3.14159 (pyĂ¶ristettynĂ€) on esimĂ€Ă€ritelty vakio, piin likiarvo
Dim d1 As Double
Dim d2 As Double
d1 = InputBox("Anna alfa-kulman viereisen kateetin pituus: ","Viereinen kateetti")
d2 = InputBox("Anna alfa-kulman vastaisen sivun pituus: ","Vastainen kateetti")
Print "Kulma alfa on"; (atn (d2/d1) * 180 / Pi); " astetta"
End Sub
``````