Skip to content

Change Urect::width & Urect::height to be const#9640

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
EmiOnGit:const
Aug 30, 2023
Merged

Change Urect::width & Urect::height to be const#9640
alice-i-cecile merged 1 commit intobevyengine:mainfrom
EmiOnGit:const

Conversation

@EmiOnGit
Copy link
Copy Markdown
Contributor

Objective

The two functions
Urect::height,
Urect::width
are currently not const.
Since the methods are very unlikely to change (ever) and are useful to be const for some games, they should be.

@EmiOnGit
Copy link
Copy Markdown
Contributor Author

Also just saw that #7557 is related

@alice-i-cecile alice-i-cecile added A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Aug 30, 2023
@alice-i-cecile
Copy link
Copy Markdown
Member

If only we had constant float arithmetic :( One day, maybe.

@EmiOnGit
Copy link
Copy Markdown
Contributor Author

If only we had constant float arithmetic :( One day, maybe.

So true. I feel like so many crates would benefit greatly. :(
Sadly, it seems like the progress on const float arithmetics is stalled

@alice-i-cecile alice-i-cecile 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 Aug 30, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Aug 30, 2023
Merged via the queue into bevyengine:main with commit 36eedbf Aug 30, 2023
@EmiOnGit EmiOnGit deleted the const branch August 30, 2023 18:10
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use 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.

3 participants