Block Generator 32<TEngine>.Next Bytes Method
Fills the specified span with random bytes in little-endian order.
Definition
Namespace: Numerics.NET.Random.Generators
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public void NextBytes(
Span<byte> buffer
)Parameters
Implements
IRandomGenerator.NextBytes(Span<Byte>)Remarks
This method writes bytes by repeatedly generating words (32-bit or 64-bit depending on the generator) and converting them to bytes in little-endian order.
When the buffer length is not evenly divisible by the word size, the method consumes one additional word and writes only the required low-order bytes (tail consumption rule).
The byte sequence produced by NextBytes(Span<Byte>) is stable and portable across all platforms.