Cos (function)

Syntax

Cos(angle)

Description

Returns a Double representing the cosine of angle.

Comments

The angle parameter is a Double specifying an angle in radians.

Example

This example assigns the cosine of pi/4 radians (45 degrees) to C# and displays its value.

Sub Main()

  c# = Cos(3.14159 / 4)
  MsgBox "The cosine of 45 degrees is: " & c#
End Sub

See Also

Tan (function); Sin (function); Atn (function).

More information

C