Law of Cosines

$c^2 = a^2 + b^2 - 2ab\cos C$
Drag vertices A, B, C to reshape the triangle.