when to use cosine
The Law of Cosines (also called the Cosine Rule) is very useful for solving triangles: It works for any triangle: a, b and c are sides.