DistancePointSegment2() public static method

public static DistancePointSegment2 ( Vector3 a, Vector3 b, Vector3 p ) : float
a Vector3
b Vector3
p Vector3
return float
Ejemplo n.º 1
0
        public static float DistancePointSegment2(int x, int z, int px, int pz, int qx, int qz)
        {
            Vector3 p = new Vector3((float)x, 0f, (float)z);
            Vector3 a = new Vector3((float)px, 0f, (float)pz);
            Vector3 b = new Vector3((float)qx, 0f, (float)qz);

            return(AstarMath.DistancePointSegment2(a, b, p));
        }