diff options
author | 2020-02-08 20:02:31 +0100 | |
---|---|---|
committer | 2020-02-08 20:02:31 +0100 | |
commit | 95880ca74bddb6a23774621ef766b91956d40a61 (patch) | |
tree | be7cb1428c877a58c50abb843dc1964f7a012c48 /wgpu/src/transformation.rs | |
parent | 4e9e051caaf76e2c76aaa79c2463409a8280265f (diff) | |
parent | 8e4741ad778e227628d36dcfc748c5cdc23310f3 (diff) | |
download | iced-95880ca74bddb6a23774621ef766b91956d40a61.tar.gz iced-95880ca74bddb6a23774621ef766b91956d40a61.tar.bz2 iced-95880ca74bddb6a23774621ef766b91956d40a61.zip |
Merge pull request #181 from Imberflur/improvement/update-winit
Update `winit` to `0.21`
Diffstat (limited to 'wgpu/src/transformation.rs')
-rw-r--r-- | wgpu/src/transformation.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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) )) |