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

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

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

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

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

            v.Absolute();

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

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