📦 Archived documentation: r1 (committed 2026-10-07) View current documentation →

Math.sin()

Math.sin(x) → number

Returns the sine of x.

Returns the sine of the angle x, given in radians. The result is in the range -1 to 1.

Arguments

NameTypeRequiredDefaultDescription
x number optional — An angle in radians.

Returns

number The sine of x.

Example

let s = Math.sin(Math.PI / 2); // 1