- if let walls = &self.wall_grid.cells[c.x][c.y] {
- for w in walls {
- if let Intersection::Point(p) = Intersection::lines(p1, p2, w.p1, w.p2) {
- let wall = Wall {
- region: &self.walls[w.region],
- edge: w,
- };
- return IntersectResult::Intersection(wall, p)
- }
+ for w in &self.wall_grid.cells[c.x][c.y] {
+ if let Intersection::Point(p) = Intersection::lines(p1, p2, w.p1, w.p2) {
+ let wall = Wall {
+ region: &self.walls[w.region],
+ edge: w,
+ };
+ return IntersectResult::Intersection(wall, p)