bevy/crates/bevy_math/src
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
..
primitives Replace deprecated elements (#10999) 2023-12-16 23:24:49 +00:00
rects normalize method for Rect (#10297) 2023-10-28 19:02:58 +00:00
affine3.rs Automatic batching/instancing of draw commands (#9685) 2023-09-21 22:12:34 +00:00
aspect_ratio.rs Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
cubic_splines.rs Add Cubic prefix to all cubic curve generators (#10299) 2023-10-28 21:53:38 +00:00
lib.rs Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
ray.rs Split Ray into Ray2d and Ray3d and simplify plane construction (#10856) 2023-12-06 14:09:04 +00:00