mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
All these files need further edits + other optimization files + moving of files
17 lines
398 B
PHP
17 lines
398 B
PHP
<?php
|
|
|
|
class LinearCongruentialGenerator
|
|
{
|
|
public static function bsd(int $seed)
|
|
{
|
|
return function() use(&$seed) {
|
|
return $seed = (1103515245 * $seed + 12345) % (1 << 31);
|
|
}
|
|
}
|
|
|
|
public static function msvcrt(int $seed) {
|
|
return function() use (&$seed) {
|
|
return ($seed = (214013 * $seed + 2531011) % (1 << 31)) >> 16;
|
|
};
|
|
}
|
|
} |