Given the angle of a right triangle as input, returns the ratio of the triangle's adjacent side over its hypotenuse.
|θ||angle||The angle of a right triangle.|
Returns the ratio of the right triangle’s adjacent side over its hypotenuse.
The cosine function provides a mapping between the horizontal component of a right-triangle and the angle of the triangle. This can be visualized with the graph of cos(θ) from 0 to 2π below:
This can be geometrically visualized by putting a right-triangle and the graph side by side. Drag either of the points to interact with the graphic below:
Note, that the hypotenuse of the right triangle is one in the interactive above, but the function will return the same ratio for the input angle since what is returned is a ratio of the sides.