// SetRange updates the range used by the field of view. If the size is
// smaller, cached structures will be preserved, otherwise they will be
// reinitialized.
SetRange updates the range used by the field of view. If the size is
smaller, cached structures will be preserved, otherwise they will be
reinitialized.
// SetRange updates the range used by the field of view . If the size is // smaller cached structures will be preserved otherwise they will be // reinitialized .
func (fov *FOV) SetRange(rg gruid.Range) {
	fov.Rg = rg
	max := rg.Size()
	if max.X*max.Y <= fov.Capacity {
		return
	}
	nfov := NewFOV(rg)
	*fov = *nfov
}
func ( fov * FOV ) SetRange ( rg gruid . Range ) { fov . Rg = rg max := rg . Size ( ) if max . X * max . Y <= fov . Capacity { return } nfov := NewFOV ( rg ) * fov = * nfov }
SetRange updates the range used by the field of view.
SetRange updates the range used by the field of view .