Skip to content

Commit

Permalink
Use uniform{Double,Float}01M for random
Browse files Browse the repository at this point in the history
  • Loading branch information
curiousleo committed Jun 25, 2020
1 parent 64c52a5 commit 67e12bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/System/Random.hs
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ instance Random Char
instance Random Bool
instance Random Double where
randomR r g = runStateGen g (uniformRM r)
random g = runStateGen g (uniformRM (0, 1))
random g = runStateGen g uniformDouble01M
instance Random Float where
randomR r g = runStateGen g (uniformRM r)
random g = runStateGen g (uniformRM (0, 1))
random g = runStateGen g uniformFloat01M

-------------------------------------------------------------------------------
-- Global pseudo-random number generator
Expand Down

0 comments on commit 67e12bf

Please sign in to comment.