public void MachinePosition_disttoSelf_distisZero() { MachinePosition mp1 = new MachinePosition(); double dist = mp1.DistanceTo(mp1); Assert.AreEqual(0, dist); }
public void MachinePosition_distTo5axisOnlyPt_distisOK() { MachinePosition mp1 = new MachinePosition(0, 0, 0, 45, 45); MachinePosition mp2 = new MachinePosition(0, 0, 0, 0, 0); double dist = mp1.DistanceTo(mp2); Assert.AreEqual(0, dist); }
public void MachinePosition_distToPt_distisOK() { MachinePosition mp1 = new MachinePosition(0, 0, 0); MachinePosition mp2 = new MachinePosition(1, 1, 1); double dist = mp1.DistanceTo(mp2); Assert.AreEqual(Math.Sqrt(3), dist); }
public void MachPosition_distance() { var mp1 = new MachinePosition(); var mp2 = new MachinePosition() { X = 3, Y = 4 }; var d = mp1.DistanceTo(mp2); Assert.AreEqual(5, d); }