예제 #1
0
        public void AbsoluteMaximumIndexExample()
        {
            var vector1 = new Vector2D(1, -4);

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

            var vector2 = new Vector2D(5, -4);

            Assert.AreEqual(0, vector2.AbsoluteMaximumIndex());
        }
예제 #2
0
        public void Simple()
        {
            var vector1 = new Vector2D(1, -4);

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

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

            var vector2 = new Vector2D(5, -4);

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

            Assert.AreEqual(5, vector2.X);
            Assert.AreEqual(-4, vector2.Y);
        }