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

Carry over any full seconds due to rounding within TimeCode::fromSeconds #735

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

benbankes
Copy link

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #734
Related issues/PRs #549
License MIT

What's in this PR?

This PR contains a fix to a rounding error in TimeCode::fromSeconds()

Why?

Previously, TimeCode::fromSeconds(59.999) would return 00:00:59.100, which is about 9/10ths of a second incorrect. Now it will return 00:01:00.00, which is correctly rounded.

Example Usage

See new tests.

BC Breaks/Deprecations

None - this change only fixes one bug.

To Do

  • Create tests (done)

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

Successfully merging this pull request may close these issues.

TimeCode From Seconds Is Incorrect
1 participant