Mixin adding convenience number-generation methods on top of a nextBytes-producing random source.
- Implemented types
- Implementers
Constructors
- Rng()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
nextBool(
) → bool -
Generates a random boolean value.
override
-
nextBytes(
int length) → BuBytes -
nextDouble(
) → double -
Generates a non-negative random floating point value uniformly distributed
in the range from 0.0, inclusive, to 1.0, exclusive.
override
-
nextInt(
int max) → int -
Generates a non-negative random integer uniformly distributed in the range
from 0, inclusive, to
max, exclusive.override -
nextU32(
{Endian endian = Endian.little}) → int -
nextU64(
{Endian endian = Endian.little}) → BigInt -
nextU8(
) → int -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited