net.sf.josceleton.commons.util
Class RandomUtil
java.lang.Object
net.sf.josceleton.commons.util.RandomUtil
public final class RandomUtil
- extends Object
- Since:
- 0.4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
randFromZeroToExclusive
public static int randFromZeroToExclusive(int exclusiveMax)
- Since:
- 0.4
generateWithinRange
public static int generateWithinRange(int middle,
int deviation)
- Generates a number within the given range.
Example: middle = 50; deviation = 10; result will be = [40..60]
- Parameters:
middle
- fixed pointdeviation
- the number can be different from middle point
- Returns:
- a number max
deviation
away from middle- Since:
- 0.4
Copyright © 2011 Josceleton. All Rights Reserved.