Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compiler] Rounding Error for long decimals #20

Open
goatandsheep opened this issue Apr 16, 2019 · 3 comments
Open

[Compiler] Rounding Error for long decimals #20

goatandsheep opened this issue Apr 16, 2019 · 3 comments

Comments

@goatandsheep
Copy link
Collaborator

Because I didn't carry the rounding, numbers such as 1.99999996 will compile to 00:00:01.1 . This is extremely problematic.

@goatandsheep
Copy link
Collaborator Author

It's fixed pretty easily by changing compiler:145 from Math.round --> Math.floor. I'm just waiting on my PR to be approved

osk pushed a commit that referenced this issue Apr 20, 2019
@osk
Copy link
Owner

osk commented Apr 20, 2019

Fixed in #22

@osk osk closed this as completed Apr 20, 2019
@londonshliach
Copy link

londonshliach commented Oct 11, 2023

This error was re-introduced in #36

1.99999 will now compile to 00:00:01.1000 (which makes the VTT file invalid).

See here:
https://jsfiddle.net/londonshliach/e0kpbgL3/

@goatandsheep goatandsheep reopened this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants