Skip to content

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

Closed
SUPERCILEX wants to merge 2 commits into
bevyengine:mainfrom
SUPERCILEX:patch-2
Closed

SUPERCILEX wants to merge 2 commits into
bevyengine:mainfrom
SUPERCILEX:patch-2

Conversation

@SUPERCILEX

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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

@colepoirier

Copy link
Copy Markdown
Contributor

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

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

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

Copy link
Copy Markdown
Member

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
@alice-i-cecile
alice-i-cecile requested a review from mockersf May 16, 2022 20:04
@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
Copy Markdown
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