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

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

            v         = new Vector4F(1, 2, 3, 4);
            absoluteV = Vector4F.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()
        {
            Vector4F v = new Vector4F(-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 Vector4F(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()
        {
            Vector4F v = new Vector4F(-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 Vector4F(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);
        }