public static double Symmetry_Over_X_Axis(this PM_Maze maze) { int width = maze.Q_Width(); int height = maze.Q_Height(); double symmetrySum = 0.0; for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { Vec2i cell = new Vec2i(x, y); Vec2i symmetricCell = maze.Find_SymmetricCell_Over_X_Axis(cell); symmetrySum += maze.Cells__Symmetry_X_Axis(cell, symmetricCell); } } return(symmetrySum / (double)maze.NumCells__All()); }