Find this segment!

Take triangle ABC with area S. The angle ACB is gamma.

The point D on side AB is chosen such that

triangles ADC and DCB have the equal inradii.

Find the length of CD.

%%%%%%%%%%%

Answer:

CD = [S / tan(gamma / 2)]1/2