bevy/crates
Olle Lukowski 6b9cd57956
Introduce AspectRatio struct (#10368)
# Objective

- Fix an inconsistency in the calculation of aspect ratio's. 
- Fixes #10288 

## Solution

- Created an intermediate `AspectRatio` struct, as suggested in the
issue. This is currently just used in any places where aspect ratio
calculations happen, to prevent doing it wrong. In my and @mamekoro 's
opinion, it would be better if this was used instead of a normal `f32`
in various places, but I didn't want to make too many changes to begin
with.

## Migration Guide
- Anywhere where you are currently expecting a f32 when getting aspect
ratios, you will now receive a `AspectRatio` struct. this still holds
the same value.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2023-12-17 02:01:26 +00:00
..
bevy_a11y Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_animation docs: AnimationPlayer::play doesn't have transition_duration arg (#10970) 2023-12-13 18:51:34 +00:00
bevy_app Remove unnecessary parentheses (#10990) 2023-12-16 02:26:18 +00:00
bevy_asset Remove unnecessary parentheses (#10990) 2023-12-16 02:26:18 +00:00
bevy_audio Non-Intrusive refactor of play_queued_audio_system() (#10910) 2023-12-09 14:27:39 +00:00
bevy_core Replace deprecated elements (#10999) 2023-12-16 23:24:49 +00:00
bevy_core_pipeline Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
bevy_derive Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
bevy_diagnostic Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_dylib Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_dynamic_plugin Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_ecs Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
bevy_ecs_compile_fail_tests Rename WorldQueryData & WorldQueryFilter to QueryData & QueryFilter (#10779) 2023-12-12 19:45:50 +00:00
bevy_encase_derive Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_gilrs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_gizmos Rename WorldQueryData & WorldQueryFilter to QueryData & QueryFilter (#10779) 2023-12-12 19:45:50 +00:00
bevy_gltf Add GltfLoaderSettings (#10804) 2023-11-30 00:34:45 +00:00
bevy_hierarchy Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
bevy_input Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
bevy_internal Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_log Add helper macro's for logging only once (#10808) 2023-12-05 01:56:40 +00:00
bevy_macro_utils Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
bevy_mikktspace Enable clippy::undocumented_unsafe_blocks warning across the workspace (#10646) 2023-11-21 02:06:24 +00:00
bevy_pbr Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
bevy_ptr Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
bevy_reflect Fix debug printing for dynamic types (#10740) 2023-12-12 19:44:43 +00:00
bevy_reflect_compile_fail_tests Fix nested generics in Reflect derive (#10791) 2023-11-29 01:46:09 +00:00
bevy_render Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
bevy_scene Mention DynamicSceneBuilder in doc comment (#10780) 2023-11-28 23:45:00 +00:00
bevy_sprite Add docs to bevy_sprite a little (#10947) 2023-12-14 17:25:55 +00:00
bevy_tasks Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_text Replace deprecated elements (#10999) 2023-12-16 23:24:49 +00:00
bevy_time Add First/Pre/Post/Last schedules to the Fixed timestep (#10977) 2023-12-14 04:35:40 +00:00
bevy_transform Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_ui Remove unnecessary parentheses (#10990) 2023-12-16 02:26:18 +00:00
bevy_utils Make SystemTime available in both native and wasm (#10980) 2023-12-14 16:36:24 +00:00
bevy_window Change Window scale factor to f32 (adopted) (#10897) 2023-12-14 14:56:40 +00:00
bevy_winit Change Window scale factor to f32 (adopted) (#10897) 2023-12-14 14:56:40 +00:00