Ejemplo n.º 1
0
        public void Line_rotateY_returnsVal()
        {
            ILine3  line = new Line3(1, 1, 0, 2, 2, 0);
            Vector3 pc   = new Vector3(0, 0, 0);

            ILine3 lrot = line.RotateY(pc, Math.PI);

            Assert.AreEqual(line.Length, lrot.Length, "len");
            Assert.AreEqual(-1d, Math.Round(lrot.Point1.X, 8), "x1");
            Assert.AreEqual(1d, Math.Round(lrot.Point1.Y, 8), "y1");
            Assert.AreEqual(0d, Math.Round(lrot.Point1.Z, 8), "z1");
            Assert.AreEqual(-2d, Math.Round(lrot.Point2.X, 8), "x2");
            Assert.AreEqual(2d, Math.Round(lrot.Point2.Y, 8), "y2");
            Assert.AreEqual(0d, Math.Round(lrot.Point2.Z, 8), "z2");
        }