mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-29 23:40:27 +00:00
10c5adadb8
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)
13 lines
418 B
C#
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);
|
|
}
|