public void TestMultiplyArrays()
        {
            var array1   = new[] { 1.2, 2.3, 3.4, 4.5 };
            var array2   = new[] { 1.1, 2.2, 3.3, 1 };
            var expected = new[] { 1.32, 5.06, 11.22, 4.5 };

            Assert.IsTrue(TestUtils.SequenceEquals(expected, WaveMath.GetOperationFunction(WaveMath.OperationEnum.Multiply)(array1, array2)));
            Assert.IsTrue(TestUtils.SequenceEquals(expected, WaveMath.Multiply(array2, array1)));
            Assert.IsTrue(TestUtils.SequenceEquals(expected, WaveMath.Multiply(array1, array2.SubArray(3))));
        }
        public void TestAddArrays()
        {
            var array1    = new[] { 1.2, 2.3, 3.4, 4.5 };
            var array2    = new[] { 1.1, 2.2, 3.3, 0 };
            var expected  = new[] { 2.3, 4.5, 6.7, 4.5 };
            var expected2 = new[] { 2.3, 4.5, 6.7, 0 };

            Assert.IsTrue(TestUtils.SequenceEquals(expected, WaveMath.GetOperationFunction(WaveMath.OperationEnum.Sum)(array1, array2)));
            Assert.IsTrue(TestUtils.SequenceEquals(expected, WaveMath.Add(array2, array1)));
            Assert.IsTrue(TestUtils.SequenceEquals(expected, WaveMath.Add(array1, array2.SubArray(3))));
            Assert.IsTrue(TestUtils.SequenceEquals(expected2, WaveMath.Add(array1.SubArray(3), array2)));
        }
        public void TestSubtractArrays()
        {
            var array1    = new[] { 1.2, 2.2, 3.4, 4.5 };
            var array2    = new[] { 1.1, 2.3, 3.3, 0 };
            var expected1 = new[] { 0.1, -0.1, 0.1, 4.5 };
            var expected2 = new[] { -0.1, 0.1, -0.1, -4.5 };
            var expected3 = new[] { -0.1, 0.1, -0.1, 0 };

            Assert.IsTrue(TestUtils.SequenceEquals(expected1, WaveMath.GetOperationFunction(WaveMath.OperationEnum.Subtract)(array1, array2)));
            Assert.IsTrue(TestUtils.SequenceEquals(expected2, WaveMath.Subtract(array2, array1)));
            Assert.IsTrue(TestUtils.SequenceEquals(expected1, WaveMath.Subtract(array1, array2.SubArray(3))));
            Assert.IsTrue(TestUtils.SequenceEquals(expected3, WaveMath.Subtract(array1.SubArray(3), array2)));
        }
        public void TestDivideArrays()
        {
            var array1    = new[] { 2, 4, 0, 12.0 };
            var array2    = new[] { 1, 0, 3, 8.0 };
            var expected1 = new[] { 2, 0, 0, 1.5 };
            var expected2 = new[] { 0.5, 0, 0, 0.6666667 };
            var expected3 = new[] { 2, 0, 0, 12.0 };
            var expected4 = new[] { 0.5, 0, 0, 8 };

            Assert.IsTrue(TestUtils.SequenceEquals(expected1, WaveMath.GetOperationFunction(WaveMath.OperationEnum.Divide)(array1, array2)));
            Assert.IsTrue(TestUtils.SequenceEquals(expected2, WaveMath.Divide(array2, array1)));
            Assert.IsTrue(TestUtils.SequenceEquals(expected3, WaveMath.Divide(array1, array2.SubArray(3))));
            Assert.IsTrue(TestUtils.SequenceEquals(expected4, WaveMath.Divide(array1.SubArray(3), array2)));
        }