struct PhisicalLocation
{
double x;
double y;
double z;
};
double calculatePhisicalDistance(const PhisicalLocation& p1, const PhisicalLocation& p2)
{
double a = std::pow((p1.x - p2.x), 2) + std::pow((p1.y - p2.y), 2) + std::pow((p1.z - p2.z), 2);
return std::sqrt(a);
}
c++计算三维点之间的距离
最新推荐文章于 2023-12-22 08:45:08 发布