public void Point3DDistToYZ() { double expected = 5; Point3D p1 = new Point3D(0, -3, 0); Point3D p2 = new Point3D(0, 0, -4); Assert.AreEqual(expected, p1.DistTo(p2)); }
public void Point3DDistToX() { double expected = 1; Point3D p1 = new Point3D(0, 0, 0); Point3D p2 = new Point3D(1, 0, 0); Assert.AreEqual(expected, p1.DistTo(p2)); }
public void Point3DDistToRectYZ() { double expected = 5; Point3D p1 = new Point3D(0, -4, -5); RectPrism rect = new RectPrism(-1, -1, -1, 1, 1, 1); Assert.AreEqual(expected, p1.DistTo(rect)); }
public void Point3DDistToRectXYZ() { double expected = 7; Point3D p1 = new Point3D(3, 4, 7); RectPrism rect = new RectPrism(-1, -1, -1, 1, 1, 1); Assert.AreEqual(expected, p1.DistTo(rect)); }
public void Point3DDistToRectX() { double expected = 1; Point3D p1 = new Point3D(-2, 0, 0); RectPrism rect = new RectPrism(-1, -1, -1, 1, 1, 1); Assert.AreEqual(expected, p1.DistTo(rect)); }