Law of cosines (source code)

= Law of cosines
{wiki}

For a <triangle> with side lengths $a,b,c$ and angle $C$ opposite $c$, the law of cosines states
$$
c^2=a^2+b^2-2ab\cos C.
$$