PKHeX/PKHeX.Core/Util/RandUtil.cs
Kurt 10c5adadb8 Misc tweaks
Add more xmldoc
Move files/functions to better spot
Less allocation on hover glow
fix honeytree dppt group/slot/shake rand call (ty real.96)
2024-02-03 14:11:17 -06:00

13 lines
418 B
C#

using System;
namespace PKHeX.Core;
public static partial class Util
{
/// <inheritdoc cref="Random.Shared"/>
public static Random Rand => Random.Shared;
public static uint Rand32() => Rand32(Rand);
public static uint Rand32(this Random rnd) => ((uint)rnd.Next(1 << 30) << 2) | (uint)rnd.Next(1 << 2);
public static ulong Rand64(this Random rnd) => rnd.Rand32() | ((ulong)rnd.Rand32() << 32);
}