on cbaff88 help sign in
elk/libraries/Random.elm
16 lines 530 B history raw
2module Random where
4import Signal (Signal)
5import Native.Random
7-- Given a range from low to high and a signal of values, this produces
8-- a new signal that changes whenever the input signal changes. The new
9-- values are random number between 'low' and 'high' inclusive.
10range : Int -> Int -> Signal a -> Signal Int
11range = Native.Random.range
13-- Produces a new signal that changes whenever the input signal changes.
14-- The new values are random numbers in [0..1).
15float : Signal a -> Signal Float
16float = Native.Random.float