bevy
bevy copied to clipboard
DRY out `bevy_render` `Color` function bodies.
Just some general cleanup, reusing other functions
Thanks for the cleanup :)
could you inline the various as_*_f32 functions? I think the rgba linear is already, but not the hsla or rgba
Any reason why we're inlining these functions in particular? It looks like most of the APIs in bevy are not currently marked as inlined.
Any reason why we're inlining these functions in particular? It looks like most of the APIs in bevy are not currently marked as inlined.
Rule of thumb we've been following is "tiny methods that may be called in a hot loop". It won't matter for final release builds as they'll use Link Time Optimization, but this can help make the dev experience more reflective of final performance.