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

feat: mark some functions in bevy_math as const #16439

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DaAlbrecht
Copy link

@DaAlbrecht DaAlbrecht commented Nov 19, 2024

Objective

Mark simple functions as const in bevy_math #16124

Solution

  • Make them const

Testing

cargo test -p bevy_math --all-features

Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@DaAlbrecht
Copy link
Author

Sadly most functions I saw can't be marked as const until floating point arithmetic is marked as const in the std.

I quickly searched in bevy_color and bevy_ui but this seemed already done.

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy 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 A-Math Fundamental domain-agnostic mathematical operations labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Math Fundamental domain-agnostic mathematical operations C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy 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.

2 participants