All Versions
29
Latest Version
Avg Release Cycle
31 days
Latest Release
2776 days ago
Changelog History
Page 2
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 toSeedableFromOtherRandomGenerator
, the reseeder is created fromReseeder.seeded
- For Swift >= 3.1, if
Reseeder
isDeviceRandom
orARC4Random
, the reseeder is justReseeder.default
- If
- โ Added floating-point value generation methods for open, half open, and closed intervals
- โ Added thread-local random generators :tada:
๐ Improvements
- Made
Double
andFloat
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
- โ Added initializers to
-
v4.3.1 Changes
March 21, 2017 -
v4.3.0 Changes
March 21, 2017๐ New Features
- โ Added
SeedableFromOtherRandomGenerator
protocol- Allows for creating a
RandomGenerator
seeded from anotherRandomGenerator
- Allows for creating a
- โ Added
ReseedingRandomGenerator
struct for reseeding a baseRandomGenerator
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
- โ Added
-
v4.2.0 Changes
March 15, 2017๐ Improvements
Made Array
init(randomCount:using:)
about 4 times faster for integer types by having it safely callinit(unsafeRandomCount:using:)
Made Dictionary shuffling faster
๐ Changes
- Made Array
init(unsafeRandomCount:using:)
available for all element types, regardless if they conform toUnsafeRandom
-
v4.1.0 Changes
March 15, 2017 -
v4.0.0 Changes
March 06, 2017๐ New Features
- โ Added
randoms(using:)
methods toRandom-
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 toShuffleable
andUniqueShuffleable
- โ Added
randomTuple(using:)
global functions for creating tuples of up to six random elements - โ Added
ShuffleableInRange
andUniqueShuffleableInRange
protocols
๐ Improvements
- ๐ Much better
init(randomCount:using:)
performance forArray
andDictionary
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 aninout
argument - โ Removed
URL
conformance toRandom
- โ Added
-
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 toUnsafeRandom
- 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
andRandomWithExactWidth
protocols - โ Added
randomize(buffer:maxWidth:)
andrandomize(buffer:exactWidth:)
methods toRandomGenerator
๐ Improvements
- Generating
RandomEnum
values is significantly faster
๐ Fixes
UnicodeScalar
now produces a uniform distribution when theRange
orClosedRange
spans below0xD7FF
and above0xE000
๐ Changes
- โ Removed
RandomDistribution
(#29) - The
devRandom
anddevURandom
cases forRandomGenerator
are now a singledevice
case with aDeviceSource
parameter - The
arc4random
case forRandomGenerator
is now camel-casedarc4Random
- ๐
Float80
extension now available for i386 and x86_64 architectures, not only for macOS URL.random(fromValues:)
now returns anOptional<URL>
- โ Added ShiftOperations dependency
- ๐ Uses
Strideable
instead of_Strideable
-
v2.3.0 Changes
November 21, 2016๐ New Features
Date
now conforms toRandomWithinRange
- Made unicode scalar based string generation faster
- Created
UnsafeRandom
,RandomEnum
,RandomWithAll
, andRandomRawRepresentable
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 -
v2.2.0 Changes
November 07, 2016๐ Fixes
- Random
Int
generation would rely on the size ofUIntMax
which was apparently not reliable (#28)
๐ Changes
- ๐ง If on Linux, Android, or Windows, the
arc4random_buf
function will be dynamically loaded, making theRandomGenerator.arc4random
option more widely available - โ Removed default parameter for
randomGenerator
for therandom(using:)
function ofRange
types - โ Removed
Random
protocol dependency fromRandom-
protocols
- Random