Table of Contents

Interface ISessionRandomNumberGenerator

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

The state of the standard library's random-number generator (MS-VBAL §6.1.2.10.1.6 Rnd and §6.1.2.10.2.1 Randomize), which outlives a call to either.

public interface ISessionRandomNumberGenerator

Remarks

The generator is MS-VBA's, so that a program that seeds it gets the sequence it gets in MS-VBA: a 24-bit linear congruential generator whose state is also the last number it generated, as a fraction of 224. A session that no program has seeded starts where MS-VBA starts, so that the first Rnd of a session is 0.7055475, as it is in a new MS-VBA process.

An End resets it with the rest of the session: the program that runs next generates the sequence a new session does.

Properties

Seed

The generator's state: a 24-bit value, from 0 to 16777215, that the next number is generated from.

int Seed { get; set; }

Property Value

int

Methods

Reset()

The seed of a session that no program has run in: the one MS-VBA starts a new process with.

void Reset()