# Cos Function

āļāˇāļĢāļēāļ āˇāļēāˇāļąāļē āļāļ´āˇāˇ āļŊāļļāˇ āļ¯āˇāļēāˇ. āļāˇāļĢāļē āļģāˇāļŠāˇāļēāļąāˇ āˇāļŊāˇāļąāˇ āˇāˇāˇāˇāˇāļĢāļē āļāļģ āļāļ­. āļ´āˇâāļģāļ­āˇāļĩāļŊāļē -1 āˇāˇ 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.

### Syntax:

``````
Cos (Number As Double) As Double
``````

Double

### Parameters:

āļāļāļāļē: āļāļļāļ§ āˇāļēāˇāļąāļē āļāļĢāļąāļē āļāˇāļģāˇāļ¸āļ§ āļāˇāˇāˇâāļē āļāˇāļĢāļē āļģāˇāļŠāˇāļēāļąāˇ āˇāļŊāˇāļąāˇ āļāļģāˇāļŽ āļ¯āļāˇāˇāļą āˇāļāļāˇâāļēāˇāļ­āˇāļ¸āļ āļ´āˇâāļģāļāˇāˇāļąāļē.

āļāļāˇāļ āļģāˇāļŠāˇāļēāļą āˇāļŊāļ§ āļ´āļģāˇāˇāļģāˇāļ­āļąāļē āļāˇāļģāˇāļ¸āļ§ āļāļāˇāļ Pi/180āļāˇāļąāˇ āļāˇāļĢ āļāļģāļąāˇāļą āˇāˇ āļģāˇāļŠāˇāļēāļą āļāļāˇāļ āˇāļŊāļ§ āļ´āļģāˇāˇāļģāˇāļ­āļąāļē āļāˇāļģāˇāļ¸āļ§ āļģāˇāļŠāˇāļēāļą 180/Piāļāˇāļąāˇ āļāˇāļĢ āļāļģāļąāˇāļą.

āļāļāˇāļ=(āļģāˇāļŠāˇāļēāļą*180)/Pi

āļģāˇāļŠāˇāļēāļą=(āļāļāˇāļ*Pi)/180

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

### Error codes:

5 Invalid procedure call

### Example:

``````
' The following example allows for a right-angled triangle the input of
' secant and angle (in degrees) and calculates the length of the hypotenuse:
Sub ExampleCosinus
REM rounded Pi = 3.14159
Dim d1 As Double, dAngle As Double