/// <summary> /// Expand 32 bit seed to 64 bit deterministically, ensuring there are bits set in the upper part /// </summary> public static ulong ExpandSeed(uint seed) { unchecked { ulong upper = (ulong)HashUtil.XorFold64To32(seed * 7199369) << 32; return(((ulong)seed | upper) ^ 0b11100000_01111101_01000011_11110110_01001111_10100000_01100000_10011011UL); } }
static RandomSeed() { s_seedIncrement = 997; int sysSeed = (int)HashUtil.XorFold64To32((ulong)Stopwatch.GetTimestamp() ^ (ulong)Environment.TickCount); s_systemRandom = new Random(sysSeed); }
public static uint Hash32(ulong one, ulong two) { return(HashUtil.XorFold64To32(Hash64(one, two))); }
public static uint Hash32(float x, float y) { return(HashUtil.XorFold64To32(Hash64(x, y))); }