Contents

# Cos Function

Racuna kosinus jednoga ugla. Ugao je izrazen u radijanima. Rezultat je u opsegu od -1 do +1.

Using the angle Alpha, the Cos function calculates the ratio of the length of the side that is adjacent to the angle, divided by the length of the hypotenuse in a right-angled triangle.

Cos(Alpha) = Adjacent/Hypotenuse

### Syntax:

    Cos (Number As Double) As Double

### Return type:

Double

### Parameters:

Number: Brojcani izraz koji predstavlja ugao u radijanima za koji zelite da izracunate kosinus.

Da bi pretvorili stepene u radijane, pomnozi stepen sa Pi/180. Da bi pretvorili radijane u stepene, pomnozi radijane sa 180/Pi.

stepen=(radijan*180)/Pi

radijan=(stepen*Pi)/180

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

### Error codes:

5 Invalid procedure call

### Example:

    REM Slijedeci primjer dozvoljava pravouglom trouglu unos
    REM sekante i ugla (u stepenima) i racuna duzinu hipotenuze:
    Sub ExampleCosinus
    REM zaokruzen Pi = 3.1415926...
    Dim d1 As Double, dAngle As Double
        d1 = InputBox$ (""Unesite duzinu susjedne strane: ","Susjedna")
        dUgao = InputBox("Unesite ugao Alfa (u stepenima): ","Alfa")
        Print "The length of the hypotenuse is"; (d1 / cos (dAngle * Pi / 180))
    End Sub

Related Topics

Atn Function

Sin Function

Tan Function

Please support us!