Beispiel #1
0
        public void AbsoluteStatic()
        {
            Vector2D v         = new Vector2D(-1, -2);
            Vector2D absoluteV = Vector2D.Absolute(v);

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

            v         = new Vector2D(1, 2);
            absoluteV = Vector2D.Absolute(v);
            Assert.AreEqual(1, absoluteV.X);
            Assert.AreEqual(2, absoluteV.Y);
        }
Beispiel #2
0
        public void Absolute()
        {
            Vector2D v = new Vector2D(-1, -2);
              v.Absolute();

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

              v = new Vector2D(1, 2);
              v.Absolute();
              Assert.AreEqual(1, v.X);
              Assert.AreEqual(2, v.Y);
        }
Beispiel #3
0
        public void Absolute()
        {
            Vector2D v = new Vector2D(-1, -2);

            v.Absolute();

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

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