module Random::Formatter
Format raw random number as Random
does
Public Instance Methods
rand → float
rand(max) → number
Generates formatted random number from raw random bytes. See Random#rand
.
Alias for: random_number
random_number(max) -> number
click to toggle source
Generates formatted random number from raw random bytes. See Random#rand
.
static VALUE rand_random_number(int argc, VALUE *argv, VALUE obj) { rb_random_t *rnd = try_get_rnd(obj); VALUE v = rand_random(argc, argv, obj, rnd); if (NIL_P(v)) v = rand_random(0, 0, obj, rnd); else if (!v) invalid_argument(argv[0]); return v; }
Also aliased as: rand