Cosine is the basic function of trigonometry. Cosineθ in a right angle triangle is the ratio of the lengths of the side of the triangle adjacent to the angle and the hypotenuse, where θ is the angle that need to be measured.
Cosθ = Base(adjacent) / Hypotenuse
x