extn::[−][src] core:: random
Random provides an interface to Ruby’s pseudo-random number generator, or PRNG. The PRNG produces a deterministic sequence of bits which approximate true randomness. The sequence may be represented by integers, floats, or binary strings.
This module implements the
Random singleton object from Ruby Core.
Random is implemented using a modified Mersenne Twister that
reproduces the same byte and float sequences as the MRI implementation.
You can use this class in your application by accessing it directly. As a Core API, it is globally available:
Random::DEFAULT.bytes(16) r = Random.new(33) r.rand
FFI glue between the Rust trampolines and the mruby C interpreter.
Glue between mruby FFI and
A range constraint for generating random numbers.
A generated random number.