diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-02-06 17:45:51 +0100 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-02-06 17:45:51 +0100 |
commit | 3df8c9103c145bcc9395a382c726208759db54c8 (patch) | |
tree | 94af80965e08f434ac6d9e3589dbf9c3622dd7e6 | |
parent | 0600897369b08786aa737c389c9fa76289b3d961 (diff) |
Fix floating point errors
-rw-r--r-- | main.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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})`; |