From 3df8c9103c145bcc9395a382c726208759db54c8 Mon Sep 17 00:00:00 2001 From: Mango0x45 Date: Sat, 6 Feb 2021 17:45:51 +0100 Subject: Fix floating point errors --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index c587806..992e05e 100644 --- a/main.js +++ b/main.js @@ -12,8 +12,8 @@ function compute() const s = Math.round(frames / fps * 1000) / 1000; /* Show the time and mod message in the DOM */ - const sf = st * fps; - const ef = et * fps; + const sf = Math.trunc(st * fps); + const ef = Math.trunc(et * fps); const t = time_format(s); const mod_message = `Mod Note: Retimed (Start Frame: ${ sf}, End Frame: ${ef}, FPS: ${fps}, Total Time: ${t})`; -- cgit v1.2.3