Example #1
0
        public void Init6()
        {
            TComplex testClass = new TComplex(0, -22.22);
            string   output    = "0 + i * -22.22";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #2
0
        public void Init5()
        {
            TComplex testClass = new TComplex(-3.02, 7);
            string   output    = "-3.02 + i * 7";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #3
0
        public void Init4()
        {
            TComplex testClass = new TComplex(4.01, 6);
            string   output    = "4.01 + i * 6";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #4
0
        public void Init3()
        {
            TComplex testClass = new TComplex(3, -2);
            string   output    = "3 + i * -2";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #5
0
        public void Init2()
        {
            TComplex testClass = new TComplex(0, 0);
            string   output    = "0 + i * 0";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #6
0
        public void Init1()
        {
            TComplex testClass = new TComplex(6, 3);
            string   output    = "6 + i * 3";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #7
0
        public void Root2()
        {
            TComplex testClass = new TComplex(16, -2);

            testClass = testClass.Root(10, 4);
            string output = "-0.301 + i * 1.286";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #8
0
        public void Root1()
        {
            TComplex testClass = new TComplex(3, 4);

            testClass = testClass.Root(5, 3);
            string output = "-0.353 + i * 1.334";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #9
0
        public void Pow2()
        {
            TComplex testClass = new TComplex(0, -3);

            testClass = testClass.Pwr(5);
            string output = "0 + i * -243";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #10
0
        public void Pow1()
        {
            TComplex testClass = new TComplex(3, 4);

            testClass = testClass.Pwr(5);
            string output = "-237 + i * -3116";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #11
0
        public void Square2()
        {
            TComplex testClass = new TComplex(0, -3);

            testClass = testClass.Square() as TComplex;
            string output = "-9 + i * 0";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #12
0
        public void Square1()
        {
            TComplex testClass = new TComplex(3, 4);

            testClass = testClass.Square() as TComplex;
            string output = "-7 + i * 24";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #13
0
        public void Reverse2()
        {
            TComplex testClass = new TComplex(3, 4);

            testClass = testClass.Reverse() as TComplex;
            string output = "0.12 + i * -0.16";

            Assert.AreEqual(output, testClass.ToString());
        }
Example #14
0
        public void Reverse1()
        {
            TComplex testClass = new TComplex(0, -3);

            testClass = testClass.Reverse() as TComplex;
            string output = "0 + i * 0.333";

            Assert.AreEqual(output, testClass.ToString());
        }