bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.4k stars 3.59k forks source link

feat: mark some functions in bevy_math as const #16439

Closed DaAlbrecht closed 2 days ago

DaAlbrecht commented 5 days ago

Objective

Mark simple functions as const in bevy_math https://github.com/bevyengine/bevy/issues/16124

Solution

Testing

cargo test -p bevy_math --all-features

github-actions[bot] commented 5 days ago

Welcome, new contributor!

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

DaAlbrecht commented 5 days ago

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.