Skip to content

Commit 468d23e

Browse files
committed
Switched to arc4random_uniform() for random number generation on watchOS and tvOS as well.
1 parent 57c63cf commit 468d23e

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)