AbsoluteValue() public method

Returns a matrix that is this matrix with the absolute value function applied to each element
public AbsoluteValue ( ) : Matrix
return Matrix
        public void Matrix_AbsoluteValueOfMatrixTest()
        {
            Matrix matrix1 = new Matrix(3,3);

            double[] matrix1Column1 = { -1, 5, 6 };
            double[] matrix1Column2 = { 2, -4, 7 };
            double[] matrix1Column3 = { 3, 6, -8 };

            matrix1.SetColumn(0, matrix1Column1);
            matrix1.SetColumn(1, matrix1Column2);
            matrix1.SetColumn(2, matrix1Column3);

            Matrix expectedResult = new Matrix(3,3);

            double[] expectedResultColumn1 = { 1, 5, 6 };
            double[] expectedResultColumn2 = { 2, 4, 7 };
            double[] expectedResultColumn3 = { 3, 6, 8 };

            expectedResult.SetColumn(0, expectedResultColumn1);
            expectedResult.SetColumn(1, expectedResultColumn2);
            expectedResult.SetColumn(2, expectedResultColumn3);

            Matrix actualResult = matrix1.AbsoluteValue();

            bool equalityResult = (actualResult == expectedResult);

            equalityResult.Should().BeTrue();
        }