cos[]

Returns the cosine of a number in degrees.

The cos[] function is a function that returns the cosine of a number. The cosine of an angle is a value that ranges from -1 to 1, and it is defined as the ratio of the side of a right triangle adjacent to the angle to the hypotenuse. The input to the function is an angle in degrees, and the output will be a value between -1 and 1.

For example, cos[0] would return 1 and cos[90] would return 0.

Cosine is commonly used to calculate the projection of a vector on the x-axis or y-axis in physics and engineering, as well as in trigonometric identities and equations.

Syntax

cos[x]

Parameters

x Number representing degrees.
Return Value Cosine of x degrees.

Examples

#<result> = cos[0]
(print,#<result>)

result: 1


#<result> = cos[45]
(print,#<result>)

result: 0.707107


#<result> = cos[90]
(print,#<result>)

result: 0

See also

sin, asin, acos, tan, atan, atan2, pi