Calculate FPS
This commit is contained in:
parent
9d8c975776
commit
52799a6bf0
2 changed files with 32 additions and 3 deletions
9
src/utils/exponential-decay.ts
Normal file
9
src/utils/exponential-decay.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export const exponentialDecay = ({
|
||||
accumulator,
|
||||
nextValue,
|
||||
biasOfNextValue,
|
||||
}: {
|
||||
accumulator: number;
|
||||
nextValue: number;
|
||||
biasOfNextValue: number;
|
||||
}) => accumulator * (1 - biasOfNextValue) + nextValue * biasOfNextValue;
|
||||
Loading…
Reference in a new issue