dsp/window: move complex sequence weighting onto Values

This simplifies the API and removes the NaN from Inf problem.
This commit is contained in:
Dan Kortschak
2020-09-12 19:55:02 +09:30
parent ddc5baeb4a
commit 8d26fba056
2 changed files with 7 additions and 19 deletions

View File

@@ -202,7 +202,7 @@ func TestWindowsComplex(t *testing.T) {
src[i] = complex(1, 1)
}
dst = NewValuesComplex(test.fnCmplx, len(src)).Transform(src)
dst = NewValues(test.fn, len(src)).TransformComplex(src)
if !equalApprox(dst, test.want, tol) {
t.Errorf("unexpected result for lookup window function %q:\ngot:%#.6v\nwant:%#.6v", test.name, dst, test.want)
}