added law of cosines to doc