回答編集履歴
1
0から1の範囲となるように除算の母数を変更
test
CHANGED
@@ -4,6 +4,6 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
-
let actual = Double(arc4random_uniform(UInt32.max))/Double(UInt32.max)
|
7
|
+
let actual = Double(arc4random_uniform(UInt32.max))/Double(UInt32.max - 1)
|
8
8
|
|
9
9
|
print(actual)
|