Xojo.Math.Cos

From Xojo Documentation

Revision as of 21:43, 30 October 2020 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

Xojo.Math.Cos(value As Double) As Double

Supported for all project types and targets.

Returns the cosine of the specified value.

Sample Code

Gets the cosine of a 45 degree angle:

Using Xojo.Math

Dim angle As Double = 45 * (Pi/180) // Convert 45 degrees to radians
Dim value As Double
value = Cos(angle) // value = 0.707