Exemplo n.º 1
0
        public void TestModule()
        {
            double[] TV       = { 2.0, 3.0, 4.0 }; //TesVar
            vector   vec      = new vector(TV);
            double   actual   = vec.Module();
            double   expected = Math.Sqrt(Math.Pow(TV[0], 2) + Math.Pow(TV[1], 2) + Math.Pow(TV[2], 2));

            Assert.AreEqual(expected, actual);
        }