RandomKit v4.0.0 Release Notes

Release Date: 2017-03-06 // about 7 years ago
  • ๐Ÿ†• New Features

    • โž• Added randoms(using:) methods to Random- types that return a sequence of random values according to the protocol's specialization
    • โž• Added Bool.random(withWeight:using:) for probability
    • โž• Added more random number generators:
      • Xorshift
      • XorshiftStar
    • NSMutableArray now conforms to Shuffleable and UniqueShuffleable
    • โž• Added randomTuple(using:) global functions for creating tuples of up to six random elements
    • โž• Added ShuffleableInRange and UniqueShuffleableInRange protocols

    ๐Ÿ‘Œ Improvements

    • ๐ŸŽ Much better init(randomCount:using:) performance for Array and Dictionary
    • Array shuffling is ten times faster
    • ๐ŸŽ Much better performance for random(within:using:) for signed integers

    ๐Ÿ”„ Changes

    • ๐Ÿ”„ Changed RandomGenerator from an enum to a protocol type
      • As a result, there is no default generator, meaning a generator must be specified as a parameter
    • Random generation functions take a generic RandomGenerator type as an inout argument
    • โœ‚ Removed URL conformance to Random