1234567891011121314151617181920212223242526 |
- using System;
- public class XOR32
- {
- public XOR32(int x_)
- {
- this.x = (uint)(471283569 + x_);
- }
- public uint next()
- {
- uint num = this.x ^ this.x << 11;
- this.x = this.y;
- this.y = this.z;
- this.z = this.w;
- return this.w = (this.w ^ this.w >> 19 ^ (num ^ num >> 8));
- }
- private uint x;
- private uint y = 362436069U;
- private uint z = 521288629U;
- private uint w = 88675123U;
- }
|