if (center.x<=w/2 && center.y>=h/2)
rtmp=(int)sqrt((float)center.y*center.y + (float)(w-center.x)*(w-center.x));
- if (center.x>=w/2 && center.y>=h/2)
+ else if (center.x>=w/2 && center.y>=h/2)
rtmp=(int)sqrt((float)center.y*center.y + (float)center.x*center.x);
- if (center.x>=w/2 && center.y<=h/2)
+ else if (center.x>=w/2 && center.y<=h/2)
rtmp=(int)sqrt((float)(h-center.y)*(h-center.y) + (float)center.x*center.x);
- if (center.x<=w/2 && center.y<=h/2)
+ else //if (center.x<=w/2 && center.y<=h/2)
rtmp=(int)sqrt((float)(h-center.y)*(h-center.y) + (float)(w-center.x)*(w-center.x));
M=2*rtmp; N=2*rtmp;
if (center.x<=w/2 && center.y>=h/2)
rtmp=(int)sqrt((float)center.y*center.y + (float)(w-center.x)*(w-center.x));
- if (center.x>=w/2 && center.y>=h/2)
+ else if (center.x>=w/2 && center.y>=h/2)
rtmp=(int)sqrt((float)center.y*center.y + (float)center.x*center.x);
- if (center.x>=w/2 && center.y<=h/2)
+ else if (center.x>=w/2 && center.y<=h/2)
rtmp=(int)sqrt((float)(h-center.y)*(h-center.y) + (float)center.x*center.x);
- if (center.x<=w/2 && center.y<=h/2)
+ else //if (center.x<=w/2 && center.y<=h/2)
rtmp=(int)sqrt((float)(h-center.y)*(h-center.y) + (float)(w-center.x)*(w-center.x));
M=2*rtmp; N=2*rtmp;
if (center.x<=w/2 && center.y>=h/2)
rtmp=(int)sqrt((float)center.y*center.y + (float)(w-center.x)*(w-center.x));
- if (center.x>=w/2 && center.y>=h/2)
+ else if (center.x>=w/2 && center.y>=h/2)
rtmp=(int)sqrt((float)center.y*center.y + (float)center.x*center.x);
- if (center.x>=w/2 && center.y<=h/2)
+ else if (center.x>=w/2 && center.y<=h/2)
rtmp=(int)sqrt((float)(h-center.y)*(h-center.y) + (float)center.x*center.x);
- if (center.x<=w/2 && center.y<=h/2)
+ else //if (center.x<=w/2 && center.y<=h/2)
rtmp=(int)sqrt((float)(h-center.y)*(h-center.y) + (float)(w-center.x)*(w-center.x));
M=2*rtmp; N=2*rtmp;