Table of Contents

Class RandomExtensions

Namespace
FishMMO.Shared
Assembly
FishMMO-SharedUtility.dll

Extension methods for System.Random, providing support for high-precision 64-bit random generation.

public static class RandomExtensions
Inheritance
RandomExtensions
Inherited Members

Methods

Next(Random, long, long)

Returns a random long integer between min (inclusive) and max (exclusive). Implements rejection sampling to eliminate modulo bias.

public static long Next(this Random random, long min, long max)

Parameters

random Random
min long
max long

Returns

long

NextULong(Random)

Returns a random unsigned 64-bit integer. Optimized to use Span to avoid heap allocations.

public static ulong NextULong(this Random random)

Parameters

random Random

Returns

ulong