Removed duplicate code.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1509236 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c97a18ad13
commit
a846ced6e3
|
@ -37,14 +37,6 @@ public class JDKRandomGenerator extends Random implements RandomGenerator {
|
|||
|
||||
/** {@inheritDoc} */
|
||||
public void setSeed(int[] seed) {
|
||||
// the following number is the largest prime that fits in 32 bits (it is 2^32 - 5)
|
||||
final long prime = 4294967291l;
|
||||
|
||||
long combined = 0l;
|
||||
for (int s : seed) {
|
||||
combined = combined * prime + s;
|
||||
}
|
||||
setSeed(combined);
|
||||
setSeed(RandomGeneratorFactory.convertToLong(seed));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue