opensim/OpenSim/Framework/Util.cs
/// <summary>
/// Get the distance between two 3d vectors
/// </summary>
/// <param name="a">A 3d vector</param>
/// <param name="b">A 3d vector</param>
/// <returns>The distance between the two vectors</returns>
Get the distance between two 3d vectors
Get the distance between two 3d vectors
public static double GetDistanceTo(Vector3 a, Vector3 b)
        {
            float dx = a.X - b.X;
            float dy = a.Y - b.Y;
            float dz = a.Z - b.Z;
            return Math.Sqrt(dx * dx + dy * dy + dz * dz);
        }
public static double GetDistanceTo ( Vector3 a , Vector3 b ) { float dx = a . X - b . X ; float dy = a . Y - b . Y ; float dz = a . Z - b . Z ; return Math . Sqrt ( dx * dx + dy * dy + dz * dz ) ; }
Get the distance between two 3d vectors
Get the distance between two 3d vectors
The distance between the two vectors
The distance between the two vectors
a
Vector3
A 3d vector
A 3d vector
b
Vector3
A 3d vector
A 3d vector