From ff011f9f0c6fc88f2706edfb04c8cde10b772337 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 3 Jan 2025 02:30:11 -0800 Subject: [PATCH] window: no float in get_middle_of_screen --- strafe-client/src/window.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strafe-client/src/window.rs b/strafe-client/src/window.rs index 59c481a..5113dc2 100644 --- a/strafe-client/src/window.rs +++ b/strafe-client/src/window.rs @@ -20,8 +20,8 @@ struct WindowContext<'a>{ } impl WindowContext<'_>{ - fn get_middle_of_screen(&self)->winit::dpi::PhysicalPosition{ - winit::dpi::PhysicalPosition::new(self.screen_size.x as f32/2.0,self.screen_size.y as f32/2.0) + fn get_middle_of_screen(&self)->winit::dpi::PhysicalPosition{ + winit::dpi::PhysicalPosition::new(self.screen_size.x/2,self.screen_size.y/2) } fn window_event(&mut self,time:integer::Time,event: winit::event::WindowEvent) { match event {