Skip to content

Commit 8092e2c

Browse files
authored
Implement basic traits for AspectRatio (#12840)
# Objective `AspectRatio` is a newtype of `f32`, so it can implement basic traits; `Copy`, `Clone`, `Debug`, `PartialEq` and `PartialOrd`. ## Solution Derive basic traits for `AspectRatio`.
1 parent cf092d4 commit 8092e2c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crates/bevy_math/src/aspect_ratio.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use crate::Vec2;
44

55
/// An `AspectRatio` is the ratio of width to height.
6+
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
67
pub struct AspectRatio(f32);
78

89
impl AspectRatio {

0 commit comments

Comments
 (0)