#include <math.h>
//计算两点之间距离
double MutliEdgePointJudge::disFromPointToPoint(QPointF firstPoint,QPointF secondPoint)
{
double width = (firstPoint.x() - secondPoint.x());//未取正
double height = (firstPoint.y() - secondPoint.y());//未取正
double dis = sqrt((height * height) + (width * width));
return dis;
}
两点之间距离
最新推荐文章于 2021-04-29 13:40:16 发布