Skip to content

format

typescript
Mathf.Sin(rad)

class: Mathf

description

Returns the sine value of the angle in radians.

parameter

param_nametypedescription
radnumberThe angle in radians.

return

typedescription
numberThe 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