on c136ea7 help sign in
elk/core/Random.elm
16 lines 579 B history raw
2module Random where
4import Native.Random
6-- Given a range from low to high, this produces a random number
7-- between 'low' and 'high' inclusive. The value in the signal does
8-- not change after the page has loaded.
9inRange : Int -> Int -> Signal Int
10inRange = Native.Random.inRange
12-- Given a range from low to high and a signal of values, this produces
13-- a new signal that changes whenever the input signal changes. The new
14-- values are random number between 'low' and 'high' inclusive.
15randomize : Int -> Int -> Signal a -> Signal Int
16randomize = Native.Random.randomize