ello
I've made a simple seeded pseudo-random number generator method using an algorithm I found on the web. It works well, but what I'd really like is to be able to calculate the nth number in the series. For example to be able to get the 500th number without first generating the 499 numbers which precede it.
Anyone know of a random seed algorithm which can be manipulated to do this?
this is what I'm using at present (this.s is the value of the seed)
Actionscript Code:
public function random(): Number
{
this.s = (this.s * 16807) % 2147483647;
return this.s / 2147483647;
}
thoughts and suggestions welcome