public static function uniform(int $n) : self
    {
        if ($n < 1) {
            throw new InvalidArgumentException('The number of elements'
                . " must be greater than 0, $n given.");
        }

        $a = [];

        for ($i = 0; $i < $n; $i++) {
            $a[] = rand(-PHP_INT_MAX, PHP_INT_MAX) / PHP_INT_MAX;
        }

        return static::quick($a);
    }
public static function uniform(int $n) : self
    {
        if ($n < 1) {
            throw new InvalidArgumentException('The number of elements'
                . " must be greater than 0, $n given.");
        }

        $a = [];

        for ($i = 0; $i < $n; $i++) {
            $a[] = rand(-PHP_INT_MAX, PHP_INT_MAX) / PHP_INT_MAX;
        }

        return static::quick($a);
    }
public static function uniform ( int $ n ) : self { if ( $ n < 1 ) { throw new InvalidArgumentException ( 'The number of elements' . " must be greater than 0, $n given." ) ; } $ a = [ ] ; for ( $ i = 0 ; $ i < $ n ; $ i ++ ) { $ a [ ] = rand ( - PHP_INT_MAX , PHP_INT_MAX ) / PHP_INT_MAX ; } return static :: quick ( $ a ) ; }
Return a uniform random vector with mean 0 and unit variance.

@param int $n
@throws \InvalidArgumentException
@return self
Return a uniform random vector with mean 0 and unit variance .