elm/libraries/Random.elm

15 lines
503 B
Elm
Raw Normal View History

module Random where
2013-07-26 14:38:11 +00:00
import Native.Random as Native
-- 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.
range : Int -> Int -> Signal a -> Signal Int
2013-07-26 14:38:11 +00:00
range = Native.range
-- Produces a new signal that changes whenever the input signal changes.
-- The new values are random numbers in [0..1).
float : Signal a -> Signal Float
2013-07-26 14:38:11 +00:00
float = Native.float