public function round(int $precision = 0) : self
    {
        if ($precision < 0) {
            throw new InvalidArgumentException('Decimal precision cannot'
                . " be less than 0, $precision given.");
        }

        $b = [];

        foreach ($this->a as $value) {
            $b[] = round($value, $precision);
        }

        return static::quick($b);
    }
public function round(int $precision = 0) : self
    {
        if ($precision < 0) {
            throw new InvalidArgumentException('Decimal precision cannot'
                . " be less than 0, $precision given.");
        }

        $b = [];

        foreach ($this->a as $value) {
            $b[] = round($value, $precision);
        }

        return static::quick($b);
    }
public function round ( int $ precision = 0 ) : self { if ( $ precision < 0 ) { throw new InvalidArgumentException ( 'Decimal precision cannot' . " be less than 0, $precision given." ) ; } $ b = [ ] ; foreach ( $ this -> a as $ value ) { $ b [ ] = round ( $ value , $ precision ) ; } return static :: quick ( $ b ) ; }
Round the elements in the matrix to a given decimal place.

@param int $precision
@throws \InvalidArgumentException
@return self
Round the elements in the matrix to a given decimal place .