mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
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`.
This commit is contained in:
parent
cf092d45f9
commit
8092e2c86d
1 changed files with 1 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
use crate::Vec2;
|
||||
|
||||
/// An `AspectRatio` is the ratio of width to height.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
|
||||
pub struct AspectRatio(f32);
|
||||
|
||||
impl AspectRatio {
|
||||
|
|
Loading…
Reference in a new issue