Thanks Andy.
I got an idea from the link you provide.
Though the idea is not the best, but it solves the purpose..
double radius = 40.0;
int x1 =100; //first Circle X value
int y1 = 100; //first Circle Y value
int x2 = 100; //second Circle X value
int y2 = 100; //second Circle Y value
double iDist = Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
double per = (100.0-(iDist/radius)*100); //get the value in %
System.out.println("Distance: "+iDist + "("+per+"%)");
OUTPUT:
if values are (100,100) and (100,100) then o/p : 100%
if values are (100,100) and (120,100) then o/p : 50%
if values are (100,100) and (140,100) then o/p : 0%
if values are (100,100) and (600,600) then o/p : percentage in negative value (ex) - 973%
All the best....!
http://mathworld.wolfram.com/Circle-CircleIntersection.html –
感謝。理解するのがほとんど難しい。数式距離= Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))を計算する他の方法はありませんか?と1つ.... – user6176116
距離の式で言うことは、いくつかのパーセント値に変換することができます – user6176116