private static IEnumerable <uint> GetSeedsFromIVs(RNG method, uint a, uint b) { Debug.Assert(a >> 15 == 0); Debug.Assert(b >> 15 == 0); uint second = a << 16; uint first = b << 16; var pairs = method.RecoverLower16Bits(first, second) .Concat(method.RecoverLower16Bits(first, second ^ 0x80000000)); foreach (var z in pairs) { yield return(z); yield return(z ^ 0x80000000); // sister bitflip } }
private static IEnumerable <uint> GetSeedsFromPID(RNG method, uint a, uint b) { Debug.Assert(a >> 16 == 0); Debug.Assert(b >> 16 == 0); uint second = a << 16; uint first = b << 16; return(method.RecoverLower16Bits(first, second)); }