Hands-on Rust: "iterates x from": (Page 92)

This may just be an issue with my understanding (math isn’t my strong suit). On page 92 (PDF):

Range iterators expect that the starting value of a range will be the minimum value, and the destination the maximum. This function uses min() and max() to find the lowest and highest of a pair of values—in this case, the starting position. It then iterates x from the start to the end of the corridor, carving the tunnel along the way.

Add a second function to add horizontal tunnels in the same way, but traversing the x axis instead of the y axis:

Is this supposed to be y instead of x?

It then iterates x from the start to the end of the corridor, carving the tunnel along the way.

1 Like