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);
        }

posted on 2008-04-24 13:35  步走高飞  阅读(4415)  评论(0编辑  收藏  举报

导航