From fb4a7968cab89a38870642d7528cb32943d07785 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 9 Jan 2020 03:56:13 +0100 Subject: Update `winit` to `0.20` --- wgpu/src/transformation.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'wgpu/src/transformation.rs') diff --git a/wgpu/src/transformation.rs b/wgpu/src/transformation.rs index c8a7ee75..666696f3 100644 --- a/wgpu/src/transformation.rs +++ b/wgpu/src/transformation.rs @@ -13,10 +13,10 @@ impl Transformation { /// Creates an orthographic projection. #[rustfmt::skip] - pub fn orthographic(width: u16, height: u16) -> Transformation { + pub fn orthographic(width: u32, height: u32) -> Transformation { Transformation(Mat4::from_cols( - Vec4::new(2.0 / f32::from(width), 0.0, 0.0, 0.0), - Vec4::new(0.0, 2.0 / f32::from(height), 0.0, 0.0), + Vec4::new(2.0 / width as f32, 0.0, 0.0, 0.0), + Vec4::new(0.0, 2.0 / height as f32, 0.0, 0.0), Vec4::new(0.0, 0.0, -1.0, 0.0), Vec4::new(-1.0, -1.0, 0.0, 1.0) )) -- cgit