Beispiel #1
0
 private Edge(Vertex start, Vertex end) : base()
 {
     if (start.Equals(end))
     {
         throw new Exception("Edge cannot be created with Vertex with same coordinates");
     }
     StartVertex = start;
     EndVertex   = end;
     Length      = start.DistanceTo(end);
     Direction   = Vector.ByTwoVertices(StartVertex, EndVertex);
 }
Beispiel #2
0
 public double DistanceTo(Vertex vertex)
 {
     return(vertex.DistanceTo(this));
 }