Skip to content

Commit 67e12bf

Browse files
committed
Use uniform{Double,Float}01M for random
1 parent 64c52a5 commit 67e12bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/System/Random.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ instance Random Char
298298
instance Random Bool
299299
instance Random Double where
300300
randomR r g = runStateGen g (uniformRM r)
301-
random g = runStateGen g (uniformRM (0, 1))
301+
random g = runStateGen g uniformDouble01M
302302
instance Random Float where
303303
randomR r g = runStateGen g (uniformRM r)
304-
random g = runStateGen g (uniformRM (0, 1))
304+
random g = runStateGen g uniformFloat01M
305305

306306
-------------------------------------------------------------------------------
307307
-- Global pseudo-random number generator

0 commit comments

Comments
 (0)