示例#1
0
        public void TestDbToLinear()
        {
            var input  = new[] { 0, 20, 6.020599913279624 };
            var target = new[] { 1.0, 10, 2 };

            var result = Dsp.DbToLinear(input).ToReadOnlyList();

            FilterAssert.ListsAreReasonablyClose(target, result);
            Assert.That(Dsp.DbToLinear(Enumerable.Empty <double>()).ToReadOnlyList().Count == 0);
            Assert.Throws <ArgumentNullException>(() => Dsp.DbToLinear(null).ToReadOnlyList());
        }