Initial version.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@524 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-10-23 02:01:29 +00:00
parent e4a101cfc2
commit 53426bc5c4
@@ -0,0 +1,29 @@
//
// $Id: RandomUtil.java,v 1.1 2001/10/23 02:01:29 shaper Exp $
package com.threerings.media.util;
import java.util.Random;
/**
* Provides miscellaneous utility routines to simplify obtaining
* useful random number values and to centralize seeding and proper
* care and feeding of the pseudo-random number generator.
*/
public class RandomUtil
{
/**
* Returns a pseudorandom, uniformly distributed <code>int</code>
* value between 0 (inclusive) and the specified value
* (exclusive).
*
* @param high the high value limiting the random number sought.
*/
public static int getInt (int high)
{
return _rnd.nextInt(high);
}
/** The random object from which we choose random numbers. */
public static Random _rnd = new Random();
}