Package org.joml
Class Random
- java.lang.Object
-
- org.joml.Random
-
public class Random extends java.lang.Object
Pseudo-random number generator.- Author:
- Kai Burjack
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static long
newSeed()
float
nextFloat()
Generate a uniformly distributed floating-point number in the half-open range [0, 1).int
nextInt(int n)
Generate a uniformly distributed integer in the half-open range [0, n).
-
-
-
Method Detail
-
newSeed
public static long newSeed()
-
nextFloat
public float nextFloat()
Generate a uniformly distributed floating-point number in the half-open range [0, 1).- Returns:
- a random float in the range [0..1)
-
nextInt
public int nextInt(int n)
Generate a uniformly distributed integer in the half-open range [0, n).- Parameters:
n
- the upper limit (exclusive) of the generated integer- Returns:
- a random integer in the range [0..n)
-
-