Function random

Source
pub fn random() -> f32
Expand description

Returns a random number in range [0,1), with Math.random(), using the emscripten-defined emscripten_random.

ยงExamples

assert!(random() >= 0);
assert!(random() < 1);