fix interpolation overflow

pull/280/head
Vladimir Mandic 2021-08-18 14:28:31 -04:00
parent 9ae7f21c81
commit 2eb8b91549
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ export function calc(newResult: Result): Result {
// - at 500ms delay buffer = ~1.8 => 55% towards live data
// - at 750ms delay buffer = ~1.4 => 71% towards live data
// - at 1sec delay buffer = 1 which means live data is used
const bufferedFactor = elapsed < 1000 ? 8 - Math.log(elapsed) : 1;
const bufferedFactor = elapsed < 1000 ? 8 - Math.log(elapsed + 1) : 1;
bufferedResult.canvas = newResult.canvas;