remove zero padding from RMA

This commit is contained in:
narumi 2023-10-24 17:03:40 +08:00
parent 4f35f21581
commit 3e5869cab3

View File

@ -67,11 +67,6 @@ func (inc *RMA) Update(x float64) {
} }
inc.counter++ inc.counter++
if inc.counter < inc.Window {
inc.Values.Push(0)
return
}
inc.Values.Push(inc.tmp) inc.Values.Push(inc.tmp)
if len(inc.Values) > MaxNumOfRMA { if len(inc.Values) > MaxNumOfRMA {
inc.Values = inc.Values[MaxNumOfRMATruncateSize-1:] inc.Values = inc.Values[MaxNumOfRMATruncateSize-1:]