Reference cos()

cos()

Calculates the cosine of an angle.

cos() is useful for many geometric tasks in creative coding. The values returned oscillate between -1 and 1 as the input angle increases. cos() takes into account the current angleMode().

Examples

Syntax

cos(angle)

Parameters

angle

the angle.


Related References