# HG changeset patch
# User alfadur
# Date 1605118711 -10800
# Node ID 1d652bca512e6896f0d089947d09a7b2e77f78f1
# Parent  2eb3469a28a0179a105ce88345823c1c22622a11
fix indexing

diff -r 2eb3469a28a0 -r 1d652bca512e rust/hwphysics/src/grid.rs
--- a/rust/hwphysics/src/grid.rs	Wed Nov 11 12:45:29 2020 -0500
+++ b/rust/hwphysics/src/grid.rs	Wed Nov 11 21:18:31 2020 +0300
@@ -52,7 +52,7 @@
     }
 
     fn get_bin(&mut self, index: Point) -> &mut GridBin {
-        &mut self.bins[index.x as usize * self.bins_count.width + index.y as usize]
+        &mut self.bins[index.y as usize * self.bins_count.width + index.x as usize]
     }
 
     fn lookup_bin(&mut self, position: &FPPoint) -> &mut GridBin {