Should it be std::max(grid_spacing_x, grid_spacing_y)/10.0;?