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

Fixed rate command #64

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

Fixed rate command #64

wants to merge 5 commits into from

Conversation

qarkai
Copy link

@qarkai qarkai commented Oct 23, 2016

If ratio is final/initial then time should be divided by it, not multiplied.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 71.919% when pulling cb62de3 on qarkai:master into 331b344 on byroot:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 71.919% when pulling cb62de3 on qarkai:master into 331b344 on byroot:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 71.919% when pulling cb62de3 on qarkai:master into 331b344 on byroot:master.

Copy link
Owner

@byroot byroot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand why this way would be more logical than the previous one.

return self.from_ordinal(int(round(self.ordinal / ratio)))

def __itruediv__(self, ratio):
self.ordinal = int(round(self.ordinal / ratio))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not call __idiv__ instead of copying the code?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Agreed.

@qarkai
Copy link
Author

qarkai commented Oct 23, 2016

The more framerate the less time value should be because there will be more text per second.
Frame = Time * Framerate. Frame is the same, Framerate changes, we need to calculate new Time:
T_new * F_new = T_old * F_old
T_new = T_old * (F_old/F_new)
Since Ratio = F_new/F_old then
T_new = T_old * (1/Ratio)
T_new = T_old/Ratio

@coveralls
Copy link

coveralls commented Oct 23, 2016

Coverage Status

Coverage increased (+0.5%) to 72.267% when pulling 32361e2 on qarkai:master into 331b344 on byroot:master.

@coveralls
Copy link

coveralls commented Oct 23, 2016

Coverage Status

Coverage increased (+0.5%) to 72.267% when pulling 9598d82 on qarkai:master into 331b344 on byroot:master.

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.

3 participants