Skip to content

Instantly share code, notes, and snippets.

@wallstop
Created September 24, 2015 00:29
Show Gist options
  • Save wallstop/1d520832a518c4b05d77 to your computer and use it in GitHub Desktop.
Save wallstop/1d520832a518c4b05d77 to your computer and use it in GitHub Desktop.
private int InternalSample() {
int retVal;
int locINext = inext;
int locINextp = inextp;
if (++locINext >=56) locINext=1;
if (++locINextp>= 56) locINextp = 1;
retVal = SeedArray[locINext]-SeedArray[locINextp];
if (retVal == MBIG) retVal--;
if (retVal<0) retVal+=MBIG;
SeedArray[locINext]=retVal;
inext = locINext;
inextp = locINextp;
return retVal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment