Skip to content

Commit 87bd891

Browse files
committed
Merge pull request #455 from frootloops/uniform-random
FIXME: swift/validation-test/stdlib/Set.swift:95
2 parents b1b3822 + 3961b71 commit 87bd891

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

validation-test/stdlib/Set.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ func helperDeleteThree(k1: TestKeyTy, _ k2: TestKeyTy, _ k3: TestKeyTy) {
9393
}
9494

9595
func uniformRandom(max: Int) -> Int {
96-
// FIXME: this is not uniform.
97-
return random() % max
96+
return Int(arc4random_uniform(UInt32(max)))
9897
}
9998

10099
func pickRandom<T>(a: [T]) -> T {

0 commit comments

Comments
 (0)