(x float32)
| 17 | } |
| 18 | |
| 19 | func (f *FirstOrderFilter) Step(x float32) float32 { |
| 20 | y := f.B0*x + f.B1*f.prevX - f.A1*f.prevY |
| 21 | f.prevY = y |
| 22 | f.prevX = x |
| 23 | return y |
| 24 | } |
| 25 | |
| 26 | // sampleRate: samples per second |
| 27 | // cutoffFreq: oscillations per second |
nothing calls this directly
no outgoing calls
no test coverage detected