format
typescript
Mathf.Cos(rad)class: Mathf
description
Returns the cosine value of the angle in radians.
parameter
| param_name | type | description |
|---|---|---|
| rad | number | The angle in radians. |
return
| type | description |
|---|---|
number | The cosine value of the angle (returns a value between -1 and 1). |
code example
typescript
// Calculate the cosine of val
let cos = Mathf.Cos(0) // cos = 1