typedef struct { float y; float minus_c0; float amp_korr; float rez_amp_korr; }DigiF; void digif_init(DigiF *filter,float minus_c0) { filter->y=0; filter->minus_c0=minus_c0; filter->amp_korr=1.-minus_c0; filter->rez_amp_korr=1./filter->amp_korr; } int digif_cycle(DigiF *filter,float x) { filter->y=((float)x)+(filter->minus_c0*filter->y); return (int)(filter->y*filter->amp_korr); }