I am trying to test if a circle intersects a square. The best way I have figured out how to do that is to find if there is an x such that: x is between the minimum and maximum x values of the square;
abs(x-centerOfCircle) <= radiusOfCircle
The problem is I can't figure out how to translate this into code, can anyone help?