Exemple #1
0
        public static double PointToSegment(GISVertex A, GISVertex B, GISVertex C)
        {
            double dot1 = Dot3Product(A, B, C);

            if (dot1 > 0)
            {
                return(B.Distance(C));
            }
            double dot2 = Dot3Product(B, A, C);

            if (dot2 > 0)
            {
                return(A.Distance(C));
            }
            double dist = Cross3Product(A, B, C) / A.Distance(B);

            return(Math.Abs(dist));
        }
Exemple #2
0
 public double Distance(GISVertex anothervertex)
 {
     return(Location.Distance(anothervertex));
 }