SassNumber::toString PHP Method

toString() public method

If the units are px the result is rounded down to the nearest integer, otherwise the result is rounded to the specified precision.
public toString ( ) : string
return string number as a string with it's units if any
    public function toString()
    {
        if (!isset($this->units)) {
            $this->units = $this->getUnits();
        }
        return ($this->units == 'px' ? floor($this->value) : str_replace(',', '.', round($this->value, self::PRECISION))) . $this->units;
    }