-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
A-ColorColor spaces and color mathColor spaces and color mathA-MathFundamental domain-agnostic mathematical operationsFundamental domain-agnostic mathematical operationsA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-ContentiousThere are nontrivial implications that should be thought throughThere are nontrivial implications that should be thought through
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.
Metadata
Metadata
Assignees
Labels
A-ColorColor spaces and color mathColor spaces and color mathA-MathFundamental domain-agnostic mathematical operationsFundamental domain-agnostic mathematical operationsA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-ContentiousThere are nontrivial implications that should be thought throughThere are nontrivial implications that should be thought through