public static function grid(float $min, float $max, int $n = 10) : array
    {
        if ($min > $max) {
            throw new InvalidArgumentException('Max cannot be less'
                . ' then min.');
        }

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

        $interval = ($max - $min) / ($n - 1);

        return range($min, $max, $interval);
    }