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:
mamekoro 2024-04-02 08:02:07 +09:00 committed by GitHub
parent cf092d45f9
commit 8092e2c86d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {