commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdigg...@apache.org
Subject cvs commit: jakarta-commons-sandbox/math/src/java/org/apache/commons/math RandomDataImpl.java
Date Thu, 05 Jun 2003 18:35:25 GMT
mdiggory    2003/06/05 11:35:25

  Modified:    math/src/java/org/apache/commons/math RandomDataImpl.java
  Log:
  PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20514
  Submitted by:	brent@worden.org
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-commons-sandbox/math/src/java/org/apache/commons/math/RandomDataImpl.java
  
  Index: RandomDataImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/math/src/java/org/apache/commons/math/RandomDataImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RandomDataImpl.java	4 Jun 2003 02:45:49 -0000	1.3
  +++ RandomDataImpl.java	5 Jun 2003 18:35:24 -0000	1.4
  @@ -170,7 +170,7 @@
                   ("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) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message