PandaLib/src/fr/pandacube/java/util/RandomUtil.java

20 lines
395 B
Java
Raw Normal View History

package fr.pandacube.java.util;
import java.util.Random;
public class RandomUtil {
public static Random rand = new Random();
public static int nextIntBetween(int minInclu, int maxExclu) {
return rand.nextInt(maxExclu-minInclu)+minInclu;
}
public static double nextDoubleBetween(double minInclu, double maxExclu) {
return rand.nextDouble()*(maxExclu-minInclu)+minInclu;
}
}