Submitted by: brent@worden.org git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140894 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
02edce0889
commit
41d1a0d8f0
|
@ -105,7 +105,7 @@ import java.util.Collection;
|
|||
* identical).</li></ul>
|
||||
*
|
||||
* @author Phil Steitz
|
||||
* @version $Revision: 1.3 $ $Date: 2003/06/04 02:45:49 $
|
||||
* @version $Revision: 1.4 $ $Date: 2003/06/05 18:35:24 $
|
||||
*/
|
||||
public class RandomDataImpl implements RandomData {
|
||||
|
||||
|
@ -170,7 +170,7 @@ public class RandomDataImpl implements RandomData {
|
|||
("upper bound must be > lower bound");
|
||||
}
|
||||
Random rand = getRan();
|
||||
return lower + (int) (Math.random() * (upper - lower + 1));
|
||||
return lower + (int) (rand.nextDouble() * (upper - lower + 1));
|
||||
}
|
||||
|
||||
public long nextLong(long lower, long upper) {
|
||||
|
|
Loading…
Reference in New Issue