mxgmn / WaveFunctionCollapse

Bitmap & tilemap generation from a single example with the help of ideas from quantum mechanics
Other
23.18k stars 1.24k forks source link

A question #30

Closed buckle2000 closed 7 years ago

buckle2000 commented 7 years ago

WTF is this? https://github.com/mxgmn/WaveFunctionCollapse/blob/6c1481c2aa42cb443ff44727cdd5c24312d67207/Model.cs#L101

mxgmn commented 7 years ago

This is an extension method defined in Stuff.cs. It returns a random index of an array according to a probability distribution in that array.

buckle2000 commented 7 years ago

Thanks!