Class XorShift
java.lang.Object
io.github.olyutorskii.aletojio.rng.xorsft.XorShift
- All Implemented Interfaces:
RndInt32
xorshift (32bit) Pseudo Random Generator.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
XorShift
public XorShift()Constructor.
-
-
Method Details
-
nextInt32
public int nextInt32()Return next random number as 32bit int with random sign-bit. -
setSeed
Set seed.Seed must be non-zero.
- Parameters:
seedArg
- seed- Throws:
IllegalArgumentException
- Seed must be non-zero
-