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

[Merged by Bors] - Fix frame count being a float #4493

Closed
wants to merge 2 commits into from
Closed

[Merged by Bors] - Fix frame count being a float #4493

wants to merge 2 commits into from

Conversation

SUPERCILEX
Copy link
Contributor

Original reasoning: #678 (comment)

That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Apr 16, 2022
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Log and removed S-Needs-Triage This issue needs to be labelled labels Apr 16, 2022
@SUPERCILEX
Copy link
Contributor Author

Actually, I just realized this isn't a public API (couldn't figure out why my imports weren't working lol) so I'm less invested in this. I still think it's a good idea since it means the frame count will break down at 2^64 instead of 2^53, but if this isn't desired then I'm happy to close.

@colepoirier
Copy link
Contributor

At a frame rate of 1_000 I believe it will take 30_000 years to overflow 2^53. Someone please check my math but I think this is accurate.

@raffimolero
Copy link

still about 2047 times less time than 2^64 :P

@colepoirier
Copy link
Contributor

still about 2047 times less time than 2^64 :P

@raffimolero do you mean about 2^11 times less ;)

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

I like this change. Even without a public interface, I prefer optimizing for correctness in this sort of design.

@alice-i-cecile alice-i-cecile added C-Code-Quality A section of code that is hard to understand or change and removed C-Usability A targeted quality-of-life change that makes Bevy easier to use labels May 16, 2022
@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 16, 2022
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request May 17, 2022
Original reasoning: #678 (comment)

That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.
@bors bors bot changed the title Fix frame count being a float [Merged by Bors] - Fix frame count being a float May 17, 2022
@bors bors bot closed this May 17, 2022
@SUPERCILEX SUPERCILEX deleted the patch-2 branch May 17, 2022 04:21
robtfm pushed a commit to robtfm/bevy that referenced this pull request May 17, 2022
Original reasoning: bevyengine#678 (comment)

That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.
exjam pushed a commit to exjam/bevy that referenced this pull request May 22, 2022
Original reasoning: bevyengine#678 (comment)

That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
Original reasoning: bevyengine#678 (comment)

That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants