diff --git a/src/state.rs b/src/state.rs index 5cab5ab..134047b 100644 --- a/src/state.rs +++ b/src/state.rs @@ -80,10 +80,6 @@ impl State { x: (((position.x / w_size.width as f64)*2.)-1.)*(w_size.width as f64/w_size.height as f64).min(1.)*(self.uniforms.camera[2] as f64) + self.uniforms.camera[0] as f64, y: -(((position.y / w_size.height as f64)*2.)-1.)*(w_size.height as f64/w_size.width as f64).min(1.)*(self.uniforms.camera[2] as f64) + self.uniforms.camera[1] as f64 }; - // let pos = Point { - // x: ((2.*position.x/(w_size.width.max(w_size.height) as f64))-1.)*(self.uniforms.camera[2] as f64) + self.uniforms.camera[0] as f64, - // y: (1.-(2.*position.y/(w_size.height.max(w_size.width) as f64)))*(self.uniforms.camera[2] as f64) + self.uniforms.camera[1] as f64 - // }; let c = self.map.voronoi.cell(self.selected_tile); if self.mouse_pressed { for i in c.iter_path(pos.clone()) {