Class SimRandom

Namespace
TDMaker.Core
Assembly
TDMaker.Core.dll

A reproducible xorshift32 random stream; zero seeds are remapped.

public sealed class SimRandom
Inheritance
SimRandom
Inherited Members

Constructors

SimRandom(uint)

Creates a stream with the supplied seed.

public SimRandom(uint seed)

Parameters

seed uint

Properties

State

The current serializable stream state.

public uint State { get; }

Property Value

uint

Methods

NextFloat()

Returns a value in [0, 1).

public float NextFloat()

Returns

float

NextInt(int)

Returns an unbiased integer in [0, exclusiveMax).

public int NextInt(int exclusiveMax)

Parameters

exclusiveMax int

Returns

int

NextUInt()

Returns the next unsigned value.

public uint NextUInt()

Returns

uint

Range(float, float)

Samples a continuous range.

public float Range(float min, float max)

Parameters

min float
max float

Returns

float