Exemplo n.º 1
0
        public void AbsoluteStatic()
        {
            Vector4 v         = new Vector4(-1, -2, -3, -4);
            Vector4 absoluteV = Vector4.Absolute(v);

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

            v         = new Vector4(1, 2, 3, 4);
            absoluteV = Vector4.Absolute(v);
            Assert.AreEqual(1, absoluteV.X);
            Assert.AreEqual(2, absoluteV.Y);
            Assert.AreEqual(3, absoluteV.Z);
            Assert.AreEqual(4, absoluteV.W);
        }
Exemplo n.º 2
0
        public void Absolute()
        {
            Vector4 v = new Vector4(-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 Vector4(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);
        }