Why, PHP?

This commit is contained in:
Shoghi Cervantes 2014-04-08 15:52:34 +02:00
parent 731fbbc8d1
commit cb32a95e60

View File

@ -48,9 +48,9 @@ class Random{
*/ */
public function setSeed($seed){ public function setSeed($seed){
$seed = crc32($seed); $seed = crc32($seed);
$this->x = $seed ^ 0x0badc0de; $this->x = ($seed ^ 9876543210) % 0x7fffffff;
$this->z = $seed ^ -123456789; $this->z = ($seed ^ -123456789) % 0x7fffffff;
$this->y = $seed ^ 0x12345678; $this->y = ($seed ^ 1122334455) % 0x7fffffff;
} }
/** /**