1;
else if(xrectangle<=x&&yrectangle>y&&
sqrt((x2-x)*(x2-x)+(y1-y)*(y1-y))<=r)
return 1;
else if(sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y))<=r)
return 1;
//check whether there is one of the four points of the circle is in the rectangle
if((x-r>=x1&&x-r<=x2||x+r>=x1&&x+r<=x2)&&y>=y1&&y<=y2||
(y-r>=y1&&y-r>=y2||y+r>=y1&&y+r<=y2)&&x>=x1&&x<=x2)
return 1;
//no case match
return 0;
}
void main()
{
printf("%d/n",IsOnRECT(1,1,1,0,0,2,2));
printf("%d/n",IsOnRECT(1,1,1,2,2,3,3));