# Atn Function

Trigonometicna funkcija koja vraca arkustangent od jednog brojcanog izraza. Povratna vrijednost je u opsegu od -Pi/2 do +Pi/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

### Syntax:

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

Double

### Parameters:

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.

### Error codes:

5 Invalid procedure call

### Example:

``````
REM Slijedeci primjer racuna za pravougli trougao
REM ugao Alfa od tangensa od ugla Alfa:
Sub ExampleAtn
REM zaorkuzen Pi = 3.1415926... je predefinisana konstanta
Dim d1 As Double
Dim d2 As Double
d1 = InputBox("Unesite duzinu strane koja je susjedna uglu: ","Susjedna")
d2 = InputBox("Unesite duzinu strane koja je suprotna uglu: ","Suprotna")
Ispis "Alfa ugao je"; (atn (d2/d1) * 180 / Pi); " stepeni"
End Sub
``````