public static function gaussian() : float
    {
        $r1 = rand(0, PHP_INT_MAX) / PHP_INT_MAX;
        $r2 = rand(0, PHP_INT_MAX) / PHP_INT_MAX;

        return sqrt(-2. * log($r1)) * cos(TWO_PI * $r2);
    }
public static function gaussian() : float
    {
        $r1 = rand(0, PHP_INT_MAX) / PHP_INT_MAX;
        $r2 = rand(0, PHP_INT_MAX) / PHP_INT_MAX;

        return sqrt(-2. * log($r1)) * cos(TWO_PI * $r2);
    }
public static function gaussian ( ) : float { $ r1 = rand ( 0 , PHP_INT_MAX ) / PHP_INT_MAX ; $ r2 = rand ( 0 , PHP_INT_MAX ) / PHP_INT_MAX ; return sqrt ( - 2. * log ( $ r1 ) ) * cos ( TWO_PI * $ r2 ) ; }
Generate a random number from a Gaussian distribution with 0 mean and
standard deviation of 1.

@return float
Generate a random number from a Gaussian distribution with 0 mean and standard deviation of 1 .