Table of Contents

Class XorShiftRandom<TInput>

Namespace
Backdash.Synchronizing.Random
Assembly
Backdash.dll

XOR Shift random number generators (shift-register generators) implementation IDeterministicRandom<TInput>

public sealed class XorShiftRandom<TInput> : IDeterministicRandom<TInput>, INetcodeRandom where TInput : unmanaged

Type Parameters

TInput
Inheritance
XorShiftRandom<TInput>
Implements
Inherited Members

Constructors

XorShiftRandom()

public XorShiftRandom()

Properties

CurrentSeed

Returns the current seed

public uint CurrentSeed { get; }

Property Value

uint

CurrentState

Returns the rng state

public uint CurrentState { get; }

Property Value

uint

Methods

Next()

Returns a random unsigned integer.

public uint Next()

Returns

uint

UpdateSeed(in Frame, ReadOnlySpan<TInput>, uint)

public void UpdateSeed(in Frame currentFrame, ReadOnlySpan<TInput> inputs, uint extraState = 0)

Parameters

currentFrame Frame
inputs ReadOnlySpan<TInput>
extraState uint