Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

Acos Function

Class

System.Math

Syntax

Dim result As Double = Math.Acos(d)

d (required; Double)

A cosine, a number between -1 and 1 inclusive

Description

The Acos function returns the arccosine of d in radians, between 0 and p.

Usage at a Glance

  • If d is out of range (less than -1 or greater than 1), Acos returns System.Double.NaN.

  • This is a shared member of the System.Math class, so it can be used without an instance.

  • To convert from radians to degrees, multiply by 180/p.

Version Differences

The Acos function did not exist in VB 6.

See Also

Asin Function, Atan Function, Atan2 Function

Категории