已知两点,求两点之间距离

    //两点之间的距离
    double GetDistance (Point point1,Point point2 )    
    {    
        double distance;    
        distance = Math.Pow((point1.x - point2.x),2) + Math.Pow((point1.y - point2.y),2);    
        distance = Math.Sqrt(distance);    

        return distance;    
    }  

猜你喜欢

转载自blog.csdn.net/lw450770448/article/details/68490524