Law of cosines (source code)

= Law of cosines
{wiki=Law_of_cosines}

The Law of Cosines is a fundamental relationship in geometry that relates the lengths of the sides of a triangle to the cosine of one of its angles. It is particularly useful for solving triangles that are not right-angled.