I have this random number generator, and have had it for quite some time, but despite how much I use it I don't really understand it.
public static int Random(int x)
{
x = x + seed;
x = (x << 13) ^ x;
return (x * (x * x * 15731 + 789221) + 1376312589) & 0x7fffffff;
}
It works really well for my purposes - it takes an integer and just spits out another random integer. It doesn't rely on a state, nor does it rely on its last output like so many linear congruential generators.
What type of generator is this? I'd like some terms that I can google to understand and learn more about it. What family of PRNG does it belong to? How/why does it work?