Swiftpack.co - btfranklin/ControlledChaos as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by btfranklin.
btfranklin/ControlledChaos 1.3.0
A Swift package for working with probability-driven randomness
⭐️ 3
🕓 23 hours ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/btfranklin/ControlledChaos.git", from: "1.3.0")

ControlledChaos

Platforms Swift versions License Swift Package Manager compatible GitHub tag build

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 receiving true
  • Function on Double to produce random values with a Gaussian distribution
  • ProbabilityGroup struct to get random items with specific probabilities
  • RandomItemBag class to randomly select finite items from a collection
  • SeededRandomNumberGenerator struct to produce random values with repeatable sequences using the SplitMix64 algorithm

License

ControlledChaos was written by B.T. Franklin (@btfranklin) from 2018 onward and is licensed under the MIT license. See LICENSE.md.

GitHub

link
Stars: 3
Last commit: Yesterday
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics