Change SMA smoothing to always include current point

It is the common practice, and it works that way on forward mode,
but in backward mode current point was excluded from the average.
This commit is contained in:
Alejandro Martinez
2024-06-24 11:42:35 -03:00
parent 7052724fe7
commit b4eea7f8fb

View File

@@ -526,8 +526,8 @@ smooth_sma(QVector<double>&data, int pos, int window, int samples)
break;
case GC_SMOOTH_BACKWARD:
window_end=0;
window_start=window *-1;
window_end=1;
window_start=window *-1 + 1;
break;
case GC_SMOOTH_CENTERED: // we should handle odd/even size better