sin Function

Top  Previous  Next

Returns the sine of a number.

Syntax

Math.sin(radians)

Arguments

radiansA number representing an angle (in radians).        

Return Value

A number, within the range -1 and 1, which represents the sine of the angle. If the is a string, it returns NaN.

Examples

Math.sin(0);           // Returns 0

Math.sin(0.5);         // Returns 0.4794255

Math.sin(0);           // Returns 1

Math.sin(Math.PI);     // Returns -8.742278e-8

Math.sin(Math.PI/2));  // Returns 1

See also

Math.acos