bevy
bevy copied to clipboard
Constify `Rect`
Objective
None of Rect's methods are const, but they can be.
Solution
Make them const.
Testing
The tests in the rect module still pass.
Realised this might be stupid, glam's functions aren't const because of all the simd optimisations?
I'm not sure though, Rect isn't normally used in such a way that makes those kind of optimisations meaningful.
I don't see a downside to this, you never know when someone might need a part of code to be const. Looks good to me