# Tan Function

Odredjiva tangens ugla. Ugao je izrazen u radijanima.

Using the angle Alpha, the Tan function calculates the ratio of the length of the side opposite the angle to the length of the side adjacent to the angle in a right-angled triangle.

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

### Syntax:

``````
Tan (Number As Double) As Double
``````

Double

### Parameters:

Number: Brojcani izraz koji obiljezava ugao u radijanima za koji zelite izracunati tangens.

To convert degrees to radians, multiply by Pi/180. To convert radians to degrees, multiply by 180/Pi.

Pi is approximately 3.141593.

### Error codes:

5 Invalid procedure call

### Example:

``````
REM U ovom primjeru, slijedeci unos je moguc za pravougli trougao:
REM Strana suprotna uglu i ugao (u stepenima) za racunanje duzine strane koja je susjedna uglu:
Sub ExampleTangens
REM Pi = 3.1415926... je predefinisana varijabla
Dim d1 As Double
Dim dAlpha As Double
d1 = InputBox("Unesite duzinu strane koja je suprotna uglu: ","suprotna")
dAlpha = InputBox("Unesite ugao Alfa (u stepenima): ","Alfa")
Print "duzina strane koja je susjedna uglu je"; (d1 / tan (dAlpha * Pi / 180))
End Sub
``````