Equation of angle bisector

I've seen that if you have two lines: r = Ax + By + C = 0 and r = Dx + Ey + F = 0, you can say the equation of the line that is the angle bisector of r and s is given by: $$\frac{|Ax + By + C|}{\sqrt{A^2+B^2}}=\frac{|Dx + Ey + F|}{\sqrt{D^2+E^2}}.$$
Why is that?

I would think to equate the distances from the angle bisector to each line. Is that what is happening here?