Random
XorShift128Engine Random Number Noise, used for fast seeded values Most of the code in this class was adapted from the XorShift128Engine in the php-random library.
Constants
W
php
public const W = 88675123X
php
public const X = 123456789Y
php
public const Y = 362436069Z
php
public const Z = 521288629Properties
$seed protected
php
protected int $seedMethods
__construct()
php
public function __construct(int $seed = -1)getSeed()
php
public function getSeed() : intnextBoolean()
php
public function nextBoolean() : boolReturns a random boolean
nextBoundedInt()
php
public function nextBoundedInt(int $bound) : intnextFloat()
php
public function nextFloat() : floatReturns a float between 0.0 and 1.0 (inclusive)
nextInt()
php
public function nextInt() : intReturns an 31-bit integer (not signed)
nextRange()
php
public function nextRange(int $start = 0, int $end = 0x7fffffff) : intReturns a random integer between $start and $end
nextSignedFloat()
php
public function nextSignedFloat() : floatReturns a float between -1.0 and 1.0 (inclusive)
nextSignedInt()
php
public function nextSignedInt() : intReturns a 32-bit integer (signed)
setSeed()
php
public function setSeed(int $seed) : void