internal class Vector3
{
float x;
float y;
float z;
public Vector3(float x, float y, float z)
{
this.x = x;
this.y = y;
this.z = z;
}
internal static double Distance(Vector3 startAirportPos, Vector3 endAirportPos)
{
double sqrt = System.Math.Sqrt(System.Math.Pow(startAirportPos.x - endAirportPos.x, 2) + System.Math.Pow(startAirportPos.y - endAirportPos.y, 2) + System.Math.Pow(startAirportPos.z - endAirportPos.z, 2));
return System.Math.Abs(sqrt);
}
}
实现 计算两个三维坐标点的 距离
最新推荐文章于 2023-12-24 17:40:57 发布