jodd.util
Class MathUtil

java.lang.Object
  extended byjodd.util.MathUtil

public final class MathUtil
extends java.lang.Object

Misc math utils.


Constructor Summary
MathUtil()
           
 
Method Summary
static int randomInt(int min, int max)
          Generates pseudo-random integer from specific range.
static long randomLong(long min, long max)
          Generates pseudo-random long from specific range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathUtil

public MathUtil()
Method Detail

randomLong

public static long randomLong(long min,
                              long max)
Generates pseudo-random long from specific range. Generated number is great or equals to min parameter value and less then max parameter value.

Parameters:
min - lower (inclusive) boundary
max - higher (exclusive) boundary
Returns:
pseudo-random value

randomInt

public static int randomInt(int min,
                            int max)
Generates pseudo-random integer from specific range. Generated number is great or equals to min parameter value and less then max parameter value.

Parameters:
min - lower (inclusive) boundary
max - higher (exclusive) boundary
Returns:
pseudo-random value


Jodd v0.24.5 Javadoc