decla-red/frontend/src/scripts/helper/exponential-decay.ts
schmelczerandras 9b47d56d8f Start refactoring
2020-07-29 22:34:02 +02:00

5 lines
176 B
TypeScript

export const exponentialDecay = (
accumulator: number,
nextValue: number,
biasOfNextValue: number
) => accumulator * (1 - biasOfNextValue) + nextValue * biasOfNextValue;