Ejemplo n.º 1
0
        public void Simple()
        {
            var vector1 = new Vector2D(1, -4);

            Assert.AreEqual(1, vector1.MinimumIndex());

            Assert.AreEqual(1, vector1.X);
            Assert.AreEqual(-4, vector1.Y);

            var vector2 = new Vector2D(1, 4);

            Assert.AreEqual(0, vector2.MinimumIndex());

            Assert.AreEqual(1, vector2.X);
            Assert.AreEqual(4, vector2.Y);
        }
Ejemplo n.º 2
0
        public void MinimumIndexExample()
        {
            var vector1 = new Vector2D(1, -4);
            Assert.AreEqual(1, vector1.MinimumIndex());

            var vector2 = new Vector2D(1, 4);
            Assert.AreEqual(0, vector2.MinimumIndex());
        }