// SetRange updates the range used by the PathFinder. If the size is smaller,
// cached structures will be preserved, otherwise they will be reinitialized.
SetRange updates the range used by the PathFinder. If the size is smaller,
cached structures will be preserved, otherwise they will be reinitialized.
// SetRange updates the range used by the PathFinder . If the size is smaller // cached structures will be preserved otherwise they will be reinitialized .
func (pr *PathRange) SetRange(rg gruid.Range) {
	pr.Rg = rg
	max := rg.Size()
	if max.X*max.Y <= pr.Capacity {
		return
	}
	npr := NewPathRange(rg)
	*pr = *npr
}
func ( pr * PathRange ) SetRange ( rg gruid . Range ) { pr . Rg = rg max := rg . Size ( ) if max . X * max . Y <= pr . Capacity { return } npr := NewPathRange ( rg ) * pr = * npr }
SetRange updates the range used by the PathFinder.
SetRange updates the range used by the PathFinder .