Express the radius of the inscribed circle as a function of the sides of the triangle if it is a right triangle at $C$.

Express the radius of the inscribed circle as a function of the sides of the triangle if it is a right triangle at $C$.
We denote $X, Y$ and $Z$ as the intersections of the incircle with the sides, in alphabetical order corresponding to the vertices. We set $x=A Y=A Z, y=B X=B Z$ and $r=C X=C Y$. We then have $r=\frac{1}{2}((x+r)+(y+r)-(x+y))=\frac{1}{2}(A C+C B-A B)$.