All Versions
29
Latest Version
Avg Release Cycle
31 days
Latest Release
2500 days ago

Changelog History
Page 2

  • v4.4.0 Changes

    March 30, 2017

    ๐Ÿ†• New Features

    • โž• Added initializers to ReseedingRandomGenerator that take 1 or 0 arguments
      • If Reseeder conforms to SeedableFromOtherRandomGenerator, the reseeder is created from Reseeder.seeded
      • For Swift >= 3.1, if Reseeder is DeviceRandom or ARC4Random, the reseeder is just Reseeder.default
    • โž• Added floating-point value generation methods for open, half open, and closed intervals
    • โž• Added thread-local random generators :tada:

    ๐Ÿ‘Œ Improvements

    • Made Double and Float random(using:) about 27 times faster
    • ๐Ÿ’ป Made CGFloat.random(using:) faster , in turn making (NS|UI)Color.random(using:) faster

    ๐Ÿ›  Fixes

    • Made randomClosed methods be truly on the [0, 1] interval

  • v4.3.1 Changes

    March 21, 2017

    ๐Ÿ”„ Changes

    • Random Dates are internally relative to timeIntervalSinceReferenceDate
    • ๐Ÿ—„ Deprecated Date random(within:using:) for TimeInterval ranges

  • v4.3.0 Changes

    March 21, 2017

    ๐Ÿ†• New Features

    • โž• Added SeedableFromOtherRandomGenerator protocol
      • Allows for creating a RandomGenerator seeded from another RandomGenerator
    • โž• Added ReseedingRandomGenerator struct for reseeding a base RandomGenerator with another after a certain number of bytes have been generated

    ๐Ÿ‘Œ Improvements

    • Much faster Array random(using:) for Swift versions before 3.1

    ๐Ÿ›  Fixes

    • ๐Ÿ›  Fix compilation issues by not using API unavailable in Swift 3.1

  • v4.2.0 Changes

    March 15, 2017

    ๐Ÿ‘Œ Improvements

    • Made Array init(randomCount:using:) about 4 times faster for integer types by having it safely call init(unsafeRandomCount:using:)

    • Made Dictionary shuffling faster

    ๐Ÿ”„ Changes

    • Made Array init(unsafeRandomCount:using:) available for all element types, regardless if they conform to UnsafeRandom

  • v4.1.0 Changes

    March 15, 2017

    ๐Ÿ†• New Features

    • โž• Added seeded static variable to Xoroshiro, Xorshift, XorshiftStar, and MersenneTwister

    ๐Ÿ‘Œ Improvements

    • Made the init(randomCount:using:) family of Array initializers significantly faster

  • v4.0.0 Changes

    March 06, 2017

    ๐Ÿ†• 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

  • v3.0.0 Changes

    December 09, 2016

    ๐Ÿ†• New Features

    • Mersenne Twister random generator
    • All integer types conform to UnsafeRandom
    • Array(unsafeRandomCount:using:) for types conforming to UnsafeRandom
      • For much better performance with integer types, this should be used
    • โž• Added a benchmark target that can be built with the Swift package manager
    • Created RandomWithMaxWidth and RandomWithExactWidth protocols
    • โž• Added randomize(buffer:maxWidth:) and randomize(buffer:exactWidth:) methods to RandomGenerator

    ๐Ÿ‘Œ Improvements

    • Generating RandomEnum values is significantly faster

    ๐Ÿ›  Fixes

    • UnicodeScalar now produces a uniform distribution when the Range or ClosedRange spans below 0xD7FF and above 0xE000

    ๐Ÿ”„ Changes

    • โœ‚ Removed RandomDistribution (#29)
    • The devRandom and devURandom cases for RandomGenerator are now a single device case with a DeviceSource parameter
    • The arc4random case for RandomGenerator is now camel-cased arc4Random
    • ๐ŸŽ Float80 extension now available for i386 and x86_64 architectures, not only for macOS
    • URL.random(fromValues:) now returns an Optional<URL>
    • โž• Added ShiftOperations dependency
    • ๐Ÿ‘‰ Uses Strideable instead of _Strideable

  • v2.3.0 Changes

    November 21, 2016

    ๐Ÿ†• New Features

    • Date now conforms to RandomWithinRange
    • Made unicode scalar based string generation faster
    • Created UnsafeRandom, RandomEnum, RandomWithAll, and RandomRawRepresentable protocols

    ๐Ÿ›  Fixes

    • ๐Ÿ›  Fix which random generator is used for random String. Previously used the default instead of the one passed into the function.

  • v2.2.1 Changes

    November 08, 2016

    ๐Ÿ›  Fixes

    • ๐Ÿšš Conformance to Random was removed accidentally for types conforming to FloatingPoint. This has been fixed.

  • v2.2.0 Changes

    November 07, 2016

    ๐Ÿ›  Fixes

    • Random Int generation would rely on the size of UIntMax which was apparently not reliable (#28)

    ๐Ÿ”„ Changes

    • ๐Ÿง If on Linux, Android, or Windows, the arc4random_buf function will be dynamically loaded, making the RandomGenerator.arc4random option more widely available
    • โœ‚ Removed default parameter for randomGenerator for the random(using:) function of Range types
    • โœ‚ Removed Random protocol dependency from Random- protocols