Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }
Пример #4
0
        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));
        }
Пример #5
0
        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));
        }