//we make it that the x increases from left to right and
//y increases from top to bottom
//arrange data of the rectangle
float dist;
if(x1>x2){
dist=x2;
x2=x1;
x1=dist;
}
if(y1>y2){
dist=y2;
y2=y1;
y1=dist;
}
//check whether inscribed square of the cirle and the rectangle cross
//express the inscribed square with four line which can be expressed by a number
dist=r/(float)1.4142136;
float xSquare1=x-dist;