// SetP sets the iterator's current position.
SetP sets the iterator's current position.
// SetP sets the iterator ' s current position .
func (it *GridIterator) SetP(p gruid.Point) {
	q := p.Add(it.rg.Min)
	if !q.In(it.rg) {
		return
	}
	it.p = p
	it.i = q.Y*it.w + q.X
}
func ( it * GridIterator ) SetP ( p gruid . Point ) { q := p . Add ( it . rg . Min ) if ! q . In ( it . rg ) { return } it . p = p it . i = q . Y * it . w + q . X }
SetP sets the iterator's current position.
SetP sets the iterator ' s current position .