equal
deleted
inserted
replaced
50 fn bin_index(&self, position: &FPPoint) -> Point { |
50 fn bin_index(&self, position: &FPPoint) -> Point { |
51 self.index.map(fppoint_round(position)) |
51 self.index.map(fppoint_round(position)) |
52 } |
52 } |
53 |
53 |
54 fn get_bin(&mut self, index: Point) -> &mut GridBin { |
54 fn get_bin(&mut self, index: Point) -> &mut GridBin { |
55 &mut self.bins[index.x as usize * self.bins_count.width + index.y as usize] |
55 &mut self.bins[index.y as usize * self.bins_count.width + index.x as usize] |
56 } |
56 } |
57 |
57 |
58 fn lookup_bin(&mut self, position: &FPPoint) -> &mut GridBin { |
58 fn lookup_bin(&mut self, position: &FPPoint) -> &mut GridBin { |
59 self.get_bin(self.bin_index(position)) |
59 self.get_bin(self.bin_index(position)) |
60 } |
60 } |