Merge pull request #1358 from c9s/narumi/remove-zero-padding

MINOR: [indicator] remove zero padding from RMA
This commit is contained in:
c9s 2023-10-25 07:34:23 +08:00 committed by GitHub
commit 16f4d8de7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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:]