Exemple #1
0
        public void TestSquareI()
        {
            var x      = new ComplexNumber(0, 1);
            var result = ComplexOperations.Sqr(x);

            Assert.AreEqual(-1, result.a);
            Assert.AreEqual(0, result.b);
        }
Exemple #2
0
        public void TestSquare()
        {
            var x      = new ComplexNumber(9, 4);
            var result = ComplexOperations.Sqr(x);

            Assert.AreEqual(65, result.a);
            Assert.AreEqual(72, result.b);
        }