Exemplo n.º 1
0
 /**
  * Returns a random long between [uLow,uHigh]
  *
  * @param uLow low number of the interval.
  * @param uHigh high number of the interval.
  * @return a random long between [uLow,uHigh]
  */
 public static int getInteger(int uLow, int uHigh) {
   return (uLow + (int) (random.genrand_real2() * (uHigh + 1 - uLow)));
 }
Exemplo n.º 2
0
 /**
  * Returns a random real between [0,1)
  *
  * @return a random real between [0,1)
  */
 public static double getReal() {
   return random.genrand_real2();
 }