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 {