Skip to content

Commit

Permalink
fixed random()
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Jul 22, 2008
1 parent e4dea42 commit afdfca0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/jgroups/util/Util.java
Expand Up @@ -28,7 +28,7 @@
/**
* Collection of various utility routines that can not be assigned to other classes.
* @author Bela Ban
* @version $Id: Util.java,v 1.137.2.4 2008/05/21 09:52:34 belaban Exp $
* @version $Id: Util.java,v 1.137.2.5 2008/07/22 08:03:53 belaban Exp $
*/
public class Util {

Expand Down Expand Up @@ -926,7 +926,7 @@ public static void sleep(long msecs, boolean busy_sleep) {

/** Returns a random value in the range [1 - range] */
public static long random(long range) {
return (long)((Math.random() * 100000) % range) + 1;
return (long)((Math.random() * range) % range) + 1;
}


Expand Down

0 comments on commit afdfca0

Please sign in to comment.