format
typescript
Mathf.Sin(rad)class: Mathf
description
Returns the sine value of the angle in radians.
parameter
| param_name | type | description |
|---|---|---|
| rad | number | The angle in radians. |
return
| type | description |
|---|---|
number | The sine value of the angle in radians (returns a value between -1 and 1). |
code example
typescript
// Calculate the sine of val
let pi: number = 3.14159274
let sin = Mathf.Sin(pi/2) // sin = 1