public void DistanceBetweenTest1() { var p1 = new Point (0, 0); var p2 = new Point (3, 4); var distance = p1.DistanceBetween (p2); Assert.AreEqual (distance, 5); }
public void DistanceBetweenTest3() { var p1 = new Point (double.MaxValue, double.MaxValue); var p2 = new Point (double.MinValue, double.MinValue); var d1 = p1.DistanceBetween (p2); var d2 = p2.DistanceBetween (p1); Assert.AreEqual (double.PositiveInfinity,d1); Assert.AreEqual (double.PositiveInfinity,d2); }
public void LineDistanceBetweenTest3() { var p1 = new Point (1, 1); var p2 = new Point (1, 1); var p3 = new Point (3, 3); var distance = Line.DistanceBetween (p1, p2, p3); Assert.AreEqual (distance,p1.DistanceBetween(p3)); }