Skip to content

Releases: nvzqz/RandomKit

v2.1.0

12 Mar 01:08
v2.1.0
Compare
Choose a tag to compare

Improvements

  • Range types now have random and random(using:) for when bounds are RandomWithinRange and RandomWithinClosedRange types
  • Improved performance for retrieving random elements from collections

Fixes

  • Fixed random(within:) for unsigned integers

v2.0.0

28 Oct 20:37
v2.0.0
Compare
Choose a tag to compare

Changes

  • Swift 3 compatibility
  • A bunch of protocols/types

v1.6.0

21 Nov 20:46
Compare
Choose a tag to compare

New Features

  • randomGenerator() and randomSequence() for RandomType that return an infinite number of random values
  • New ShuffleType protocol for types that can return its values shuffled
    • Array and Dictionary can be shuffled
  • New RandomIntervalType protocol that allows for getting a random value within a closed interval
    • Random generators and sequences can be made within a closed interval
  • Getting random slices of an Array
    Phi Mage #10

Changes

  • Deleted String.RandomLength and NSURL.RandomValues

v1.5.0

25 Oct 14:21
Compare
Choose a tag to compare

New Features

  • tvOS support 📺
  • Added random generators to types in the CoreGraphics module as well as NSNumber
  • Removed the Foundation import for extensions of Swift types (only 'stdlib.h' is needed for arc4random)

Changes

  • Relevant Objective-C types now conform to RandomType

v1.4.0

17 Oct 20:23
Compare
Choose a tag to compare

New Features

  • Random phone number generator
  • Random gender generator
  • Random English honorific generator according to type and gender
  • Another CGFloat random generator with interval parameter

Changes

  • Faster Double, Float, and CGFloat generation
  • CGFloat value generation is now dependent on its NativeType

v1.3.0

15 Oct 01:53
Compare
Choose a tag to compare

New Features

  • Added random property to SequenceType that returns a random element, or nil if the sequence is empty.
  • Added random() static method to Bit, that returns One or Zero with a 50/50 chance of either.

v1.2.0

13 Oct 02:52
Compare
Choose a tag to compare

New Features

  • Random generators for NSDate and NSURL have been added

Changes

  • Parameter for Color.random() is now named #1

v1.1.0

12 Oct 06:31
Compare
Choose a tag to compare

New Features

  • RandomType protocol for types that can generate a random value of Self.
  • Added a random property to CollectionType that returns a random element of self, or nil if self is empty
  • String.RandomLength for setting the default length used by String.random()

v1.0.0

11 Oct 23:32
Compare
Choose a tag to compare

Initial release