Consider a semicircle that is tangent to two sides of the square, with endpoints of its diameter on the other two sides. Express the length of the side of the square in terms of the radius of the semicircle.