File tree Expand file tree Collapse file tree 5 files changed +11
-12
lines changed Expand file tree Collapse file tree 5 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ public protocol Collection : Sequence
784
784
/// Returns a shuffled version of this collection.
785
785
///
786
786
/// - Parameter generator: The random number generator to use when shuffling
787
- /// the collection. This parameter is not need as the default implementation
787
+ /// the collection. This parameter is not needed as the default implementation
788
788
/// of `Collection` uses the default random source in the standard library.
789
789
/// - Returns: A new array containing a shuffled version of this collection's
790
790
/// elements.
@@ -1003,7 +1003,7 @@ extension Collection {
1003
1003
/// Returns a shuffled version of this collection.
1004
1004
///
1005
1005
/// - Parameter generator: The random number generator to use when shuffling
1006
- /// the collection. This parameter is not need as the default implementation
1006
+ /// the collection. This parameter is not needed as the default implementation
1007
1007
/// of `Collection` uses the default random source in the standard library.
1008
1008
/// - Returns: A new array containing a shuffled version of this collection's
1009
1009
/// elements.
Original file line number Diff line number Diff line change @@ -2106,7 +2106,7 @@ extension BinaryFloatingPoint {
2106
2106
/// - Returns: A random representation of this floating point conforming to
2107
2107
/// `Randomizable`
2108
2108
///
2109
- /// The range of this random floating point is from 0 to 1
2109
+ /// The range of this random floating point is from 0 to 1 inclusive
2110
2110
@_inlineable
2111
2111
public static func random( using generator: RandomGenerator ) -> Self {
2112
2112
let random = generator. next ( UInt64 . self)
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ public protocol MutableCollection : Collection
162
162
/// Shuffles the current collection
163
163
///
164
164
/// - Parameter generator: The random number generator to use when shuffling
165
- /// the collection. This parameter is not need as the default implementation
165
+ /// the collection. This parameter is not needed as the default implementation
166
166
/// of `Collection` uses the default random source in the standard library.
167
167
mutating func shuffle( using generator: RandomGenerator )
168
168
@@ -237,7 +237,7 @@ extension MutableCollection {
237
237
/// Shuffles the current collection
238
238
///
239
239
/// - Parameter generator: The random number generator to use when shuffling
240
- /// the collection. This parameter is not need as the default implementation
240
+ /// the collection. This parameter is not needed as the default implementation
241
241
/// of `Collection` uses the default random source in the standard library.
242
242
@_inlineable
243
243
public mutating func shuffle(
Original file line number Diff line number Diff line change @@ -29,10 +29,9 @@ import SwiftShims
29
29
/// `FixedWidthInteger`. They must also be able to constrict that number down
30
30
/// to an upperBound.
31
31
///
32
- /// - Note: It should be worth noting that types that implement RandomGenerator
33
- /// should have a decent amount of documentation that clearly conveys whether
34
- /// or not the generator produces cryptographically-secure numbers or
35
- /// deterministically generated numbers.
32
+ /// - Note: Types that implement RandomGenerator should have a decent amount of
33
+ /// documentation that clearly conveys whether or not the generator produces
34
+ /// cryptographically secure numbers or deterministically generated numbers.
36
35
public protocol RandomGenerator {
37
36
/// Produces the next randomly generated number
38
37
///
@@ -64,7 +63,7 @@ public protocol RandomGenerator {
64
63
/// let random = Int.random
65
64
/// let randomToTen = (0 ... 10).random
66
65
///
67
- /// - Note: The default implementation of randomness is cryptographically- secure.
66
+ /// - Note: The default implementation of randomness is cryptographically secure.
68
67
/// It utilizes arc4random on newer versions of macOS, iOS, etc. On older
69
68
/// versions of these operating systems it uses /dev/urandom and SecRandomCopyBytes
70
69
/// on iOS. For Linux, it tries to use the getrandom(2) system call on newer
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public protocol RandomAccessCollection : BidirectionalCollection
117
117
///
118
118
/// - Parameter generator: The random number generator to use when getting
119
119
/// a random element.
120
- /// - Returns: A random random element this collection.
120
+ /// - Returns: A random element this collection.
121
121
///
122
122
/// A good example of this is getting a random number from 1 to 10:
123
123
///
@@ -234,7 +234,7 @@ extension RandomAccessCollection {
234
234
///
235
235
/// - Parameter generator: The random number generator to use when getting
236
236
/// a random element.
237
- /// - Returns: A random random element this collection.
237
+ /// - Returns: A random element this collection.
238
238
///
239
239
/// A good example of this is getting a random number from 1 to 10:
240
240
///
You can’t perform that action at this time.
0 commit comments