I'm not positive, but I suspect that Eric's algorithm won't work. My intuition tells me that he is effectively testing the circles bounding rect vs the square's bounding rect. Also I recall a long time ago when I was making my first version of my shadow system which cast shadows in 2D from above that finding out if a circle was intersecting a square was more complicated than you'd think it would be.
If I recall the way I did this test in my shadow system, (which also works with a sphere and a box), is to determine how far the center of the circle is from each of the lines, with a positive value if it is on the "outside" side of the line, and a negative value if it is on the "inside" side of the line. You subtract the radius of the circle from this value.
If the resulting value is < 0 for all sides, then the circle is intersecting the box. You may be able to test if it is completely inside the box by checking to see if the resulting value is less than < Radius for all sides.
I'm not positive about how accurate this is either though. There was some test I was doing which was somewhat inaccurate and that was okay because it didn't matter if I was a little sloppy around the corners of the box.
If I recall the way I did this test in my shadow system, (which also works with a sphere and a box), is to determine how far the center of the circle is from each of the lines, with a positive value if it is on the "outside" side of the line, and a negative value if it is on the "inside" side of the line. You subtract the radius of the circle from this value.
If the resulting value is < 0 for all sides, then the circle is intersecting the box. You may be able to test if it is completely inside the box by checking to see if the resulting value is less than < Radius for all sides.
I'm not positive about how accurate this is either though. There was some test I was doing which was somewhat inaccurate and that was okay because it didn't matter if I was a little sloppy around the corners of the box.