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

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

DaAlbrecht
Copy link
Contributor

@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
Contributor 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
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 22, 2024
Merged via the queue into bevyengine:main with commit 7ff47a1 Nov 22, 2024
34 checks passed
ecoskey pushed a commit to ecoskey/bevy that referenced this pull request Dec 2, 2024
# Objective

Mark simple functions as const in `bevy_math`
bevyengine#16124

## Solution

- Make them const

## Testing

`cargo test -p bevy_math --all-features`
ecoskey pushed a commit to ecoskey/bevy that referenced this pull request Jan 6, 2025
# Objective

Mark simple functions as const in `bevy_math`
bevyengine#16124

## Solution

- Make them const

## Testing

`cargo test -p bevy_math --all-features`
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