// Next advances the iterator the next position in the grid.
Next advances the iterator the next position in the grid.
// Next advances the iterator the next position in the grid .
func (it *GridIterator) Next() bool {
	if it.p.X < it.max.X {
		it.p.X++
		it.i++
		return true
	}
	if it.p.Y < it.max.Y {
		it.p.Y++
		it.p.X = 0
		it.i += it.nlstep
		return true
	}
	return false
}
func ( it * GridIterator ) Next ( ) bool { if it . p . X < it . max . X { it . p . X ++ it . i ++ return true } if it . p . Y < it . max . Y { it . p . Y ++ it . p . X = 0 it . i += it . nlstep return true } return false }
Next advances the iterator the next position in the grid.
Next advances the iterator the next position in the grid .