XorShift Class
A random number generator using the XOR Shift algorithm.
Namespace
RandN.Rngs
Interfaces
Base Types
  • object
XorShift
object
IRng

Syntax

public sealed class XorShift : IRng

Methods

NameReturn ValueSummary
Create((uint x, uint y, uint z, uint w))XorShift
Creates an XorShift RNG using the given seed.
static
Create(uint, uint, uint, uint)XorShift
Creates an XorShift RNG using the given seed.
static
Fill(Span<byte>)void
Completely fills the span with random bytes.
GetFactory()XorShift.Factory
Gets the XorShift factory.
static
NextUInt32()uint
Returns the next 32 bits in the sequence as a UInt32.
NextUInt64()ulong
Returns the next 64 bits in the sequence as a UInt64.

Extension Methods

NameValueSummary
ShuffleInPlace<XorShift, T>(IList<T>)void
Shuffles a list using the in-place Fisher-Yates shuffling algorithm.