两点之间的距离公式:
源码:
//获得平面上2点距离 double getPointToPointDis(double p1[2],double p2[2]) { return sqrt((p1[0]-p2[0])*(p1[0]-p2[0])+(p1[1]-p2[1])*(p1[1]-p2[1])); }