public static function floats(float $min, float $max, int $n = 10) : array
    {
        if (($max - $min) < 0.) {
            throw new InvalidArgumentException('Maximum cannot be'
                . ' less than minimum.');
        }

        if ($n < 1) {
            throw new InvalidArgumentException('Cannot generate less'
                . ' than 1 parameter.');
        }

        $min = (int) round($min * self::PHI);
        $max = (int) round($max * self::PHI);

        $distribution = [];

        for ($i = 0; $i < $n; $i++) {
            $distribution[] = rand($min, $max) / self::PHI;
        }

        return $distribution;
    }
public static function floats(float $min, float $max, int $n = 10) : array
    {
        if (($max - $min) < 0.) {
            throw new InvalidArgumentException('Maximum cannot be'
                . ' less than minimum.');
        }

        if ($n < 1) {
            throw new InvalidArgumentException('Cannot generate less'
                . ' than 1 parameter.');
        }

        $min = (int) round($min * self::PHI);
        $max = (int) round($max * self::PHI);

        $distribution = [];

        for ($i = 0; $i < $n; $i++) {
            $distribution[] = rand($min, $max) / self::PHI;
        }

        return $distribution;
    }
public static function floats ( float $ min , float $ max , int $ n = 10 ) : array { if ( ( $ max - $ min ) < 0. ) { throw new InvalidArgumentException ( 'Maximum cannot be' . ' less than minimum.' ) ; } if ( $ n < 1 ) { throw new InvalidArgumentException ( 'Cannot generate less' . ' than 1 parameter.' ) ; } $ min = ( int ) round ( $ min * self :: PHI ) ; $ max = ( int ) round ( $ max * self :: PHI ) ; $ distribution = [ ] ; for ( $ i = 0 ; $ i < $ n ; $ i ++ ) { $ distribution [ ] = rand ( $ min , $ max ) / self :: PHI ; } return $ distribution ; }
Generate a random distribution of floating point parameters.

@param float $min
@param float $max
@param int $n
@throws \InvalidArgumentException
@return float[]
Generate a random distribution of floating point parameters .