Const all the floating point arithmetic
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
As seen in #16091, floating point arithmetic can now be used in constant functions! This is a valuable API improvement, as it allows users to define their own derived constants using our handy math operations.
## What solution would you like?
We should constify our APIs, one crate at a time. The critical ones are:
- [ ] bevy_math
- [ ] bevy_color
- [ ] bevy_ui
This should be kept to relatively simple functions and methods: *only* things that we can commit to being const indefinitely.
## What alternative(s) have you considered?
Do let me know if I've missed a crate that needs this treatment!
## Additional context
`glam` is open to making much of their API const which will unblock a ton of improvements in Bevy itself, although it's harder than one might expect there, due to SIMD support.
Contributor guide
Research direction
Start by reading #16091 and reviewing the floating-point APIs in one of the listed crates: bevy_math, bevy_color, or bevy_ui. Identify relatively simple functions that can be committed to as const indefinitely; the work is complete when the selected crate's suitable APIs are constified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100