math/Vector.php
public static function zero(int $dimension = 0) : Vector
    {
        if ($dimension === 0) {
            return new static([]);
        }

        if ($dimension < 0) {
            throw new \InvalidArgumentException('Expected dimension to be at least 0, got ['.$dimension.'] instead.');
        }

        return new static(array_fill(0, $dimension, 0));
    }
public static function zero(int $dimension = 0) : Vector
    {
        if ($dimension === 0) {
            return new static([]);
        }

        if ($dimension < 0) {
            throw new \InvalidArgumentException('Expected dimension to be at least 0, got ['.$dimension.'] instead.');
        }

        return new static(array_fill(0, $dimension, 0));
    }
public static function zero ( int $ dimension = 0 ) : Vector { if ( $ dimension === 0 ) { return new static ( [ ] ) ; } if ( $ dimension < 0 ) { throw new \ InvalidArgumentException ( 'Expected dimension to be at least 0, got [' . $ dimension . '] instead.' ) ; } return new static ( array_fill ( 0 , $ dimension , 0 ) ) ; }
Creates a zero-length vector of the given dimension.

@param   int     $dimension          The dimension of the Vector to create. Must be >= 0.
@return  Vector                      A zero-length vector of the given dimension.
@throws  \InvalidArgumentException   When $dimension is less than 0.
Creates a zero - length vector of the given dimension .