Exemple #1
0
 public double GetDistance(Location l2)
 {
     return Math.Sqrt(Math.Pow(this.Node.Location.X - l2.X, 2) + Math.Pow(this.Node.Location.Y - l2.Y, 2));
 }
Exemple #2
0
 public Connection(Node node, Location originNodeLocation)
 {
     this.Node = node;
     this.Weight = this.GetDistance(originNodeLocation);
 }