/[classpath]/classpath/java/util/Random.java
ViewVC logotype

Diff of /classpath/java/util/Random.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by brawer, Tue Apr 30 22:15:52 2002 UTC revision 1.13 by tromey, Thu Nov 7 04:22:44 2002 UTC
# Line 259  public int nextInt(int n) Line 259  public int nextInt(int n)
259    int bits, val;    int bits, val;
260    do    do
261    {    {
262      bits = next(32);      bits = next(31);
263      val = bits % n;      val = bits % n;
264    }    }
265    while(bits - val + (n-1) < 0);    while(bits - val + (n-1) < 0);
# Line 296  public int nextInt(int n) Line 296  public int nextInt(int n)
296      int bits, val;      int bits, val;
297      do      do
298        {        {
299          bits = next(32);          bits = next(31);
300          val = bits % n;          val = bits % n;
301        }        }
302      while (bits - val + (n - 1) < 0);      while (bits - val + (n - 1) < 0);

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26