mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Various changes.
This commit is contained in:
@@ -101,9 +101,9 @@ public final class IsaacRandom {
|
||||
/**
|
||||
* Initialises this random number generator.
|
||||
*
|
||||
* @param flag Set to {@code true} if a seed was passed to the constructor.
|
||||
* @param hasSeed Set to {@code true} if a seed was passed to the constructor.
|
||||
*/
|
||||
private void init(boolean flag) {
|
||||
private void init(boolean hasSeed) {
|
||||
int i;
|
||||
int a, b, c, d, e, f, g, h;
|
||||
a = b = c = d = e = f = g = h = GOLDEN_RATIO;
|
||||
@@ -136,7 +136,7 @@ public final class IsaacRandom {
|
||||
}
|
||||
|
||||
for (i = 0; i < SIZE; i += 8) { /* fill in mem[] with messy stuff */
|
||||
if (flag) {
|
||||
if (hasSeed) {
|
||||
a += rsl[i];
|
||||
b += rsl[i + 1];
|
||||
c += rsl[i + 2];
|
||||
@@ -180,7 +180,7 @@ public final class IsaacRandom {
|
||||
mem[i + 7] = h;
|
||||
}
|
||||
|
||||
if (flag) { /* second pass makes all of seed affect all of mem */
|
||||
if (hasSeed) { /* second pass makes all of seed affect all of mem */
|
||||
for (i = 0; i < SIZE; i += 8) {
|
||||
a += mem[i];
|
||||
b += mem[i + 1];
|
||||
@@ -302,4 +302,4 @@ public final class IsaacRandom {
|
||||
return rsl[count];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user