2013-02-22 23:19:40 +00:00
|
|
|
|
|
|
|
module Random where
|
|
|
|
|
2013-07-26 14:38:11 +00:00
|
|
|
import Native.Random as Native
|
2013-03-13 07:00:02 +00:00
|
|
|
|
2013-02-22 23:19:40 +00:00
|
|
|
-- Given a range from low to high and a signal of values, this produces
|
|
|
|
-- a new signal that changes whenever the input signal changes. The new
|
|
|
|
-- values are random number between 'low' and 'high' inclusive.
|
2013-03-10 09:07:17 +00:00
|
|
|
range : Int -> Int -> Signal a -> Signal Int
|
2013-07-26 14:38:11 +00:00
|
|
|
range = Native.range
|
2013-03-10 09:07:17 +00:00
|
|
|
|
|
|
|
-- Produces a new signal that changes whenever the input signal changes.
|
2013-05-16 20:10:50 +00:00
|
|
|
-- The new values are random numbers in [0..1).
|
2013-03-10 09:07:17 +00:00
|
|
|
float : Signal a -> Signal Float
|
2013-07-26 14:38:11 +00:00
|
|
|
float = Native.float
|