Trigonometry
Any triangle: law of cosines
continues from lesson 3 — values defined earlier in the course stay live here
The law of cosines finds the third side from two sides and the angle between them — it is the Pythagorean theorem plus a correction term for the angle not being 90°: c² = a² + b² − 2ab·cos(γ).
first side
second side
= 49 deg the angle between them
= the side opposite γ
triangle(side_p, side_q, side_r)
find the 49° at vertex C
Set gamma to 90 deg: the correction term vanishes (cos 90° = 0) and the formula collapses back to Pythagoras.