double lastInput = 0;
double Filter::tick( double input )
{
double output = input + lastInput; // do filter calculation
lastInput = input; // save the filter state
return output; // output the value
}
| ©2004-2025 McGill University. All Rights Reserved. Maintained by Gary P. Scavone. |