// FillFunc updates the content for all the grid positions in order using the
// given function return value.
FillFunc updates the content for all the grid positions in order using the
given function return value.
// FillFunc updates the content for all the grid positions in order using the // given function return value .
func (gd Grid) FillFunc(fn func() Cell) {
	w := gd.Ug.Width
	yimax := gd.Rg.Max.Y * w
	cells := gd.Ug.Cells
	for yi := gd.Rg.Min.Y * w; yi < yimax; yi += w {
		ximax := yi + gd.Rg.Max.X
		for xi := yi + gd.Rg.Min.X; xi < ximax; xi++ {
			cells[xi] = fn()
		}
	}
}
func ( gd Grid ) FillFunc ( fn func ( ) Cell ) { w := gd . Ug . Width yimax := gd . Rg . Max . Y * w cells := gd . Ug . Cells for yi := gd . Rg . Min . Y * w ; yi < yimax ; yi += w { ximax := yi + gd . Rg . Max . X for xi := yi + gd . Rg . Min . X ; xi < ximax ; xi ++ { cells [ xi ] = fn ( ) } } }
FillFunc updates the content for all the grid positions in order using the
given function return value.
FillFunc updates the content for all the grid positions in order using the given function return value .