mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
set history to zero
This commit is contained in:
parent
65e24d421f
commit
422bfca221
1 changed files with 4 additions and 0 deletions
4
sma.hh
4
sma.hh
|
|
@ -17,6 +17,8 @@ class SMA1
|
|||
public:
|
||||
SMA1() : hist_avg(0), hist_pos(0)
|
||||
{
|
||||
for (int i = 0; i < NUM; ++i)
|
||||
hist_inp[i] = 0;
|
||||
}
|
||||
TYPE abs_dev()
|
||||
{
|
||||
|
|
@ -46,6 +48,8 @@ class SMA2
|
|||
public:
|
||||
SMA2() : hist_sum(0), hist_pos(0)
|
||||
{
|
||||
for (int i = 0; i < NUM; ++i)
|
||||
hist_inp[i] = 0;
|
||||
}
|
||||
TYPE operator () (TYPE input)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue