Struct java_rand::Random [] [src]

pub struct Random { /* fields omitted */ }

Methods

impl Random
[src]

[src]

[src]

Sets the seed to seed. This is equivalent to Random::new

[src]

Steps the RNG, returning up to 48 bits.

Panics

If the amount of requested bits is over 48, this function panics. Use next_i64/next_u64 instead, or multiple calls.

[src]

Fills the byte array with random bytes.

[src]

Returns a uniformly distributed signed 32-bit integer.

[src]

Returns a uniformly distributed unsigned 32-bit integer.

[src]

Returns a positive random number in the range [0, max), up to 2^31. The range of the return value is represented by the value 0 <= value < max. A maximum of less than 1 is invalid because then no value would satisfy the range.

Panics

If max is less than 1, the function panics.

[src]

Returns a positive random number in the range [0, max), up to 2^31. The range of the return value is represented by the value 0 <= value < max. A maximum of 0 is invalid because then no value would satisfy the range. Maximums of 2^31 or greater are not supported in Java.

Panics

If max reinterpreted as a signed 32-bit integer is less than 1, the function panics.

[src]

Returns a uniformly distributed signed 64-bit integer.

[src]

Returns a uniformly distributed unsigned 64-bit integer.

[src]

Returns a boolean value that has an equal chance of being true or false.

[src]

Returns a f32 uniformly distributed between 0.0 and 1.0.

[src]

Returns a f64 uniformly distributed between 0.0 and 1.0.

[src]

Returns a gaussian-distributed number with a mean of 0.0 and standard deviation of 1.0.

Trait Implementations

impl Debug for Random
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Random
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Random

impl Sync for Random