コード例 #1
0
        public void AbsoluteMaximumExample()
        {
            var vector1 = new Vector2D(1, -4);
            Assert.AreEqual(4, vector1.AbsoluteMaximum());

            var vector2 = new Vector2D(5, -4);
             Assert.AreEqual(5, vector2.AbsoluteMaximum());
        }
コード例 #2
0
ファイル: AbsoluteMaximum.cs プロジェクト: GTuritto/ngenerics
        public void Simple()
        {
            var vector1 = new Vector2D(1, -4);

            Assert.AreEqual(4, vector1.AbsoluteMaximum());

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

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

            Assert.AreEqual(5, vector2.AbsoluteMaximum());

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