A Swift package for working with probability-driven randomness
ControlledChaos
ControlledChaos
is a simple Swift package for working with probability-based randomization.
Features
- Function on
Bool
to provide random values with a specific probability of receivingtrue
- Function on
Double
to produce random values with a Gaussian distribution ProbabilityGroup
struct to get random items with specific probabilitiesRandomItemBag
class to randomly select finite items from a collection
License
ControlledChaos
was written by B.T. Franklin (@btfranklin) from 2018 onward and is licensed under the MIT license. See LICENSE.md.