Returns the angle that corresponds to a specified cosine value
...Math.Acos(cosine )
Prerequisites
None
Parameters
cosine
A required expression that evaluates to the cosine of an angle. This value must be in the range –1 <= cosine <= 1.
Remarks
Returns the angle, in radians, that corresponds to a specified cosine value. That is, if the cosine of an angle A is B, then this arc cosine function returns A when given a value of B. Since the cosine function generates the same value for both positive and negative angles, the Math.Acos method returns a value between 0 and π for any valid input expression. If the full range of angles is required, the Math.Atan2 method should be used whenever possible. To convert radians to degrees, multiply the radians times 180/π. }
Examples
Dim angle As Single
angle = Math.Acos(-1) ' Sets angle to Pi
angle = Math.Acos(Math.Sqrt(2)/2) ' Sets angle to Pi/4
angle = Math.Acos(Math.Cos(-.5)) ' Sets angle to 0.5 radians
See Also