public function formatNumber($amount, array $currency)
    {
        $rounded = $this->round(abs($amount), $currency);
        return number_format($rounded, $currency['decimals'], $currency['decimal_separator'], $currency['thousands_separator']);
    }