seedrand method
dynamic
seedrand(
- String seed
)
Implementation
seedrand(String seed) {
for (int i = 0; i < randseed.length; i++) {
randseed[i] = 0;
}
for (int i = 0; i < seed.length; i++) {
int test = randseed[i % 4] << 5;
final leftShiftMaxby1 = javaMaxInteger << 1;
if (test > leftShiftMaxby1 || test < leftShiftMaxby1) {
test = javaLongToInt(test);
}
int test2 = (test - randseed[i % 4]).toInt();
randseed[i % 4] = test2 + seed.codeUnitAt(i);
}
for (int i = 0; i < randseed.length; i++) {
randseed[i] = javaLongToInt(randseed[i]);
}
}