Reference sin()

sin()

Calculates the sine of an angle.

sin() is useful for many geometric tasks in creative coding. The values returned oscillate between -1 and 1 as the input angle increases. sin() calculates the sine of an angle, using radians by default, or according to if angleMode() setting (RADIANS or DEGREES).

Examples

Syntax

sin(angle)

Parameters

angle
Number:

the angle, in radians by default, or according to if angleMode() setting (RADIANS or DEGREES).

Returns

Number: sine of the angle.
This page is generated from the comments in src/math/trigonometry.js . Please feel free to edit it and submit a pull request!

Related References