diff --git a/crates/bevy_render/src/texture/image.rs b/crates/bevy_render/src/texture/image.rs index ee10b549c7706..e060e48154bf7 100644 --- a/crates/bevy_render/src/texture/image.rs +++ b/crates/bevy_render/src/texture/image.rs @@ -542,7 +542,7 @@ impl Image { /// Returns the aspect ratio (width / height) of a 2D image. #[inline] pub fn aspect_ratio(&self) -> AspectRatio { - AspectRatio::new(self.width() as f32, self.height() as f32) + AspectRatio::from_pixels(self.width(), self.height()) } /// Returns the size of a 2D image as f32.