getRange() -> getInRange().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2767 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -64,7 +64,7 @@ public class RandomUtil
|
|||||||
* Returns a pseudorandom, uniformly distributed <code>int</code> value between
|
* Returns a pseudorandom, uniformly distributed <code>int</code> value between
|
||||||
* <code>high</code> and <code>low</code>, exclusive of each.
|
* <code>high</code> and <code>low</code>, exclusive of each.
|
||||||
*
|
*
|
||||||
* @deprecated use getRange(int, int).
|
* @deprecated use getInRange(int, int).
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static int getInt (int high, int low)
|
public static int getInt (int high, int low)
|
||||||
@@ -76,7 +76,7 @@ public class RandomUtil
|
|||||||
* Returns a pseudorandom, uniformly distributed <code>int</code> value between
|
* Returns a pseudorandom, uniformly distributed <code>int</code> value between
|
||||||
* <code>low</code> (inclusive) and <code>high</code> (exclusive).
|
* <code>low</code> (inclusive) and <code>high</code> (exclusive).
|
||||||
*/
|
*/
|
||||||
public static int getRange (int low, int high)
|
public static int getInRange (int low, int high)
|
||||||
{
|
{
|
||||||
return low + rand.nextInt(high - low);
|
return low + rand.nextInt(high - low);
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ public class RandomUtil
|
|||||||
* Returns a pseudorandom, uniformly distributed <code>float</code> value between
|
* Returns a pseudorandom, uniformly distributed <code>float</code> value between
|
||||||
* <code>low</code> (inclusive) and <code>high</code> (exclusive).
|
* <code>low</code> (inclusive) and <code>high</code> (exclusive).
|
||||||
*/
|
*/
|
||||||
public static float getRange (float low, float high)
|
public static float getInRange (float low, float high)
|
||||||
{
|
{
|
||||||
return low + (rand.nextFloat() * (high - low));
|
return low + (rand.nextFloat() * (high - low));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user