public static boolean point_in_oval(float x,float y,float center_x,float center_y,float r1,float r2){ float a=(x-center_x); float b=(y-center_y); float c=r1*r1; float d=r2*r2; a=a*a; b=b*b; a/=c; b/=d; if(a+b<=1)return true; return false; }
沒有留言:
張貼留言