Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php
public function getSlope($dp = 0)
    {
        if ($dp != 0) {
            $coefficients = [];
            foreach ($this->slope as $coefficient) {
                $coefficients[] = round($coefficient, $dp);
            }

            return $coefficients;
        }

        return $this->slope;
    }
public function getSlope($dp = 0)
    {
        if ($dp != 0) {
            $coefficients = [];
            foreach ($this->slope as $coefficient) {
                $coefficients[] = round($coefficient, $dp);
            }

            return $coefficients;
        }

        return $this->slope;
    }
public function getSlope ( $ dp = 0 ) { if ( $ dp != 0 ) { $ coefficients = [ ] ; foreach ( $ this -> slope as $ coefficient ) { $ coefficients [ ] = round ( $ coefficient , $ dp ) ; } return $ coefficients ; } return $ this -> slope ; }
Return the Slope of the line.

@param int $dp Number of places of decimal precision to display

@return string
Return the Slope of the line .