The altitude of a right triangle from its right angle to its hypotenuse is the geometric mean of the lengths of the segments the hypotenuse is split into. Using
Pythagoras' theorem on the 3 triangles of sides
(p + q, r, s ),
(r, p, h ) and
(s, h, q ),