You can use Pythagoras' theorem to calculate the fraction of the diameter for which the vertical line

to the semicircle is under half the radius.

This is the base length of two right-angled triangles both sides of the y-axis.

You only need to work with one of them.

To calculate the length of the line segment for which the perpendicular is under half the radius...

The probability is the ratio of that length to the radius.