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)); }
public double Distance(GISVertex anothervertex) { return(Location.Distance(anothervertex)); }