RandomGenerator class Null safety

Implementation of the RAN # key, and sto/rcl

Note that the generator isn't re-seeded with the last value every time a number is requested. That means that the sequence: STO RAN # RAN # STO RAN # RAN # will yield a different result than: STO RAN # RAN # RAN # whereas the two will generate identical results on a real 15C.

Re-seeding each time would presumably generate worse results that Dart's built-in function, and I'm a little concerned it might even lead to pathological cases, like small cycles in certain cases.

Constructors

RandomGenerator()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
lastValue double
read-only
nextValue double
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
reset() → void
setNoReseed(double val) → void
Set from JSON on startup
setSeed(double seed) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited