Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static double getRandDouble(double min, double max) throws IllegalArgumentException{
- Validate.isTrue(max > min, "Max can't be smaller than min!");
- return RAND.nextDouble() * (max - min) + min;
- }
- public static boolean getChance(double chance){
- return (chance >= 100) || (chance >= getRandDouble(0, 100));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement