/// <summary>
/// 获取线段的长度
/// </summary>
/// <param name="startPoint">线段起点</param>
/// <param name="endPoint">线段终点</param>
/// <returns></returns>
public static float GetLineLength(Vector3 startPoint, Vector3 endPoint)
{
float linelength = 0;
float xdis = Mathf.Pow((startPoint.x - endPoint.x), 2);
float zdis = Mathf.Pow((startPoint.z - endPoint.z), 2);
linelength = Mathf.Sqrt((xdis + zdis));
return linelength;
}
/// <summary>
/// 获取线段的长度
/// </summary>
/// <param name="currentline">线段</param>
/// <returns></returns>
public static float GetLineLength(ArrayList currentline)
/// 获取线段的长度
/// </summary>
/// <param name="startPoint">线段起点</param>
/// <param name="endPoint">线段终点</param>
/// <returns></returns>
public static float GetLineLength(Vector3 startPoint, Vector3 endPoint)
{
float linelength = 0;
float xdis = Mathf.Pow((startPoint.x - endPoint.x), 2);
float zdis = Mathf.Pow((startPoint.z - endPoint.z), 2);
linelength = Mathf.Sqrt((xdis + zdis));
return linelength;
}
/// <summary>
/// 获取线段的长度
/// </summary>
/// <param name="currentline">线段</param>
/// <returns></returns>
public static float GetLineLength(ArrayList currentline)