Returns the formatted price with TAX.

@param int    $decimals
@param string $decimalPoint
@param string $thousandSeperator
@return string
11533
public function priceTax($decimals = null, $decimalPoint = null, $thousandSeperator = null)
    {
        return $this->numberFormat($this->priceTax, $decimals, $decimalPoint, $thousandSeperator);
    }
203933
public static function calculate_percentage($numerator, $denominator, $decimals = 2, $dec_point = '.', $thousands_sep = ',')
    {
        return number_format(($numerator / $denominator) * 100, $decimals, $dec_point, $thousands_sep);
    }
348886
public function withPostfix($values, string $currency = null, int $decimal_points = null): string
    {
        [$className, $value] = $this->classAndValue($values, $currency);

        return (new $className)->postfix($value, $decimal_points);
    }
478240
public function decimal($values, string $currency = null, int $decimal_points = 2): string
    {
        [$className, $value] = $this->classAndValue($values, $currency);

        return (new $className)->decimal($value, $decimal_points);
    }
554512
public function tax($decimals = null, $decimalPoint = null, $thousandSeperator = null)
    {
        return $this->numberFormat($this->tax, $decimals, $decimalPoint, $thousandSeperator);
    }
394607
public function subtotal($decimals = null, $decimalPoint = null, $thousandSeperator = null)
    {
        $content = $this->getContent();

        $subTotal = $content->reduce(function ($subTotal, CartItem $cartItem) {
            return $subTotal + ($cartItem->qty * $cartItem->price);
        }, 0);

        return $this->numberFormat($subTotal, $decimals, $decimalPoint, $thousandSeperator);
    }
835361
function (number, decimals, decPoint, thousandsSep) {

            number = ("" + number).replace(/[^0-9+\-Ee.]/g, "");

            var num        = !isFinite(+number) ? 0 : +number,
                prec       = !isFinite(+decimals) ? 0 : Math.abs(decimals),
                separator  = thousandsSep === undefined ? "," : thousandsSep,
                decimal    = decPoint === undefined ? "." : decPoint,
                toFixedFix = function (n, prec) {
                    var k = Math.pow(10, prec);
                    return "" + (Math.round(n * k) / k).toFixed(prec);
                },

                // Fix for IE parseFloat(0.55).toFixed(0) = 0;
                result     = (prec ? toFixedFix(num, prec) : "" + Math.round(num)).split(".");

            if (result[0].length > 3) {
                result[0] = result[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, separator);
            }

            return result.join(decimal);
        }
515525
private function number_format($number, $decimal_precision = 0, $decimals_separator = '.', $thousands_separator = ',') {
        $number = explode('.', str_replace(' ', '', $number));
        $number[0] = str_split(strrev($number[0]), 3);
        $total_segments = count($number[0]);
        for ($i = 0; $i < $total_segments; $i++) {
            $number[0][$i] = strrev($number[0][$i]);
        }
        $number[0] = implode($thousands_separator, array_reverse($number[0]));
        if (!empty($number[1])) {
           $number[1] = round($number[1], $decimal_precision);
        }
        return implode($decimals_separator, $number);
    }
397203
public function numberFormat($number, int $decimals = 0): string
    {
        if (!isset($this->numberFormatter)) {
            $this->numberFormatter = new NumberFormatter($this->intuition->getLang(), NumberFormatter::DECIMAL);
        }
        $this->numberFormatter->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
        return $this->numberFormatter->format($number);
    }
1156628
public function setNumberFormat(int $decimals, string $dec_point, string $thousands_sep)
    {
        $this->number_format = [
            'decimals'      => $decimals,
            'dec_point'     => $dec_point,
            'thousands_sep' => $thousands_sep,
        ];

        return $this;
    }
1099603
public static function percentage( $value, $decimals = 0 )
	{
		$nf = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::PERCENT);
		$nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
		return $value > 1 ? $nf->format($value) : $nf->format($value);
	}
368003
static public function centsToDollars($cents)
    {
        if (!is_numeric($cents)) {
            throw new \RuntimeException(
                sprintf('Cannot parse a non-numerical value "%s".', $cents)
            );
        }

        return number_format((float) $cents / 100, 2);
    }
106921
public function tax($amountNotTaxable = 0, $grossTax = true, $rounded = false, $withDiscount = true)
    {
        $discountTaxable = ($withDiscount) ? !config('laracart.discountTaxable', false) : false;
        $totalDiscount = ($withDiscount) ? $this->getDiscount(false) : 0;

        if (!$this->taxable) {
            $amountNotTaxable = $this->price * $this->qty;
        }

        if (config('laracart.tax_by_item')) {
            $itemCount = 0;
            $totalTax = 0;
            while ($itemCount < $this->qty) {
                $totalTax += round($this->price * $this->tax, 2);
                $itemCount++;
            }

            if ($grossTax && config('laracart.discountsAlreadyTaxed', false)) {
                $totalTax = $totalTax - ($totalDiscount - ($totalDiscount / (1 + $this->tax)));
            } else {
                if ($totalDiscount < 0 || $totalDiscount > $this->price) {
                    return $totalTax - ($totalDiscount - $this->price);
                }
            }

            if ($rounded) {
                return LaraCart::formatMoney(
                    ($totalTax - $amountNotTaxable),
                    $this->locale,
                    $this->internationalFormat,
                    false
                );
            }

            return $totalTax - $amountNotTaxable;
        }

        $totalTax = $this->tax * ($this->subTotal(false, $discountTaxable, true, false) - $amountNotTaxable);

        if (config('laracart.discountsAlreadyTaxed', false) && $withDiscount) {
            $totalTax = $totalTax - ($this->getDiscount(false) - ($this->getDiscount(false) / (1 + $this->tax)));
        }

        if ($rounded) {
            return LaraCart::formatMoney(
                $totalTax,
                $this->locale,
                $this->internationalFormat,
                false
            );
        }

        return $totalTax;
    }
651454
public function format($amount, $currency_code, $decimal = true, $full = true)
    {
        $currency = $this->currency->get($currency_code);

        if (empty($currency)) {
            return 'n/a';
        }

        if ($decimal) {
            $amount = $this->decimal($amount, $currency_code);
        }

        // Pass the amount to the currency template as %price variable
        $currency['price'] = $this->formatNumber($amount, $currency);

        if ($full) {
            return $this->formatTemplate($amount, $currency);
        }

        return $amount < 0 ? '-' . $currency['price'] : $currency['price'];
    }
309949
public static function numberFormat($number, $decimals = 0)
    {
        return is_numeric($number) ? number_format(
            $number,
            $decimals,
            __('lang_decimal_point'),
            __('lang_thousands_sep')
        ) : $number;
    }
603399
public static function benchScript($decimals = 3) : float
    {
        return (float) sprintf(
            '%0.'.(int) $decimals.'f',
            (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'])
        );
    }
356840
public function getDigits(array $decimals)
    {
        $digits = [];

        foreach ($decimals as $decimal) {
            $digits[] = $this->digits->getDigit($decimal);
        }

        return $digits;
    }