Method: Cos for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Cos for VBS
Method: Cos for VBS
Calculates the cosine of a number.
vCos = Object.Cos(number)
| Object | VBS Object with this method. You do not need to specify this object. |
| number | Variant Specifies a numeric value that corresponds to an angle in radians. |
| vCos | Variant Receives the cosine. The result ranges from -1 to 1. |
The following example calculates the cosine of the number pi.
Call MsgBox(Cos(Pi))