dsp/window: use conventional 2dp approximate constants

This commit is contained in:
Dan Kortschak
2020-09-16 14:29:00 +09:30
parent dfc757bb79
commit dda0908b26
4 changed files with 18 additions and 18 deletions

View File

@@ -148,8 +148,8 @@ func BartlettHannComplex(seq []complex128) []complex128 {
// Spectral leakage parameters: ΔF_0 = 4, ΔF_0.5 = 1.33, K = 2, ɣ_max = -42, β = -5.37.
func HammingComplex(seq []complex128) []complex128 {
const (
a0 = 25.0 / 46.0
a1 = 1 - a0
a0 = 0.54
a1 = 0.46
)
k := 2 * math.Pi / float64(len(seq)-1)