示例#1
0
        public void AbsoluteStatic()
        {
            Vector4D v         = new Vector4D(-1, -2, -3, -4);
            Vector4D absoluteV = Vector4D.Absolute(v);

            Assert.AreEqual(1, absoluteV.X);
            Assert.AreEqual(2, absoluteV.Y);
            Assert.AreEqual(3, absoluteV.Z);
            Assert.AreEqual(4, absoluteV.W);

            v         = new Vector4D(1, 2, 3, 4);
            absoluteV = Vector4D.Absolute(v);
            Assert.AreEqual(1, absoluteV.X);
            Assert.AreEqual(2, absoluteV.Y);
            Assert.AreEqual(3, absoluteV.Z);
            Assert.AreEqual(4, absoluteV.W);
        }
示例#2
0
        public void Absolute()
        {
            Vector4D v = new Vector4D(-1, -2, -3, -4);
              v.Absolute();

              Assert.AreEqual(1, v.X);
              Assert.AreEqual(2, v.Y);
              Assert.AreEqual(3, v.Z);
              Assert.AreEqual(4, v.W);

              v = new Vector4D(1, 2, 3, 4);
              v.Absolute();
              Assert.AreEqual(1, v.X);
              Assert.AreEqual(2, v.Y);
              Assert.AreEqual(3, v.Z);
              Assert.AreEqual(4, v.W);
        }
示例#3
0
        public void Absolute()
        {
            Vector4D v = new Vector4D(-1, -2, -3, -4);

            v.Absolute();

            Assert.AreEqual(1, v.X);
            Assert.AreEqual(2, v.Y);
            Assert.AreEqual(3, v.Z);
            Assert.AreEqual(4, v.W);

            v = new Vector4D(1, 2, 3, 4);
            v.Absolute();
            Assert.AreEqual(1, v.X);
            Assert.AreEqual(2, v.Y);
            Assert.AreEqual(3, v.Z);
            Assert.AreEqual(4, v.W);
        }