make loop for smallest_dimension_yet inclusive

This commit is contained in:
Terts Diepraam
2022-11-19 17:02:22 +01:00
parent 1cbc10f4fd
commit 71bff985c1
+1 -1
View File
@@ -380,7 +380,7 @@ impl Grid {
// Instead of numbers of columns, try to find the fewest number of *lines*
// that the output will fit in.
let mut smallest_dimensions_yet = None;
for num_lines in (1 .. theoretical_max_num_lines).rev() {
for num_lines in (1..=theoretical_max_num_lines).rev() {
// The number of columns is the number of cells divided by the number
// of lines, *rounded up*.