C#中求两点间距离
private double GetDistance(int A_x,int A_y,int B_x,int B_y)
{
int x=System.Math.Abs(B_x - A_x );
int y=System.Math.Abs(B_y - A_y );
return Math.Sqrt(x*x+y*y);
}
{
int x=System.Math.Abs(B_x - A_x );
int y=System.Math.Abs(B_y - A_y );
return Math.Sqrt(x*x+y*y);
}