Skip to content

Commit abeb139

Browse files
authored
Merge pull request #55 from georgemp/swift/3.0
Use arc4random_uniform() across platforms
2 parents 57c63cf + 468d23e commit abeb139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/_Random.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Glibc
1414

1515
internal func _random(_ upperBound: Int) -> Int
1616
{
17-
#if os(OSX) || os(iOS)
17+
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
1818
return Int(arc4random_uniform(UInt32(upperBound)))
1919
#else
2020
return Int(random() % upperBound)

0 commit comments

Comments
 (0)