public function round($amount, array $currency)
    {
        if (empty($currency['rounding_step'])) {
            return round($amount, $currency['decimals']);
        }

        $modifier = 1 / $currency['rounding_step'];
        return round($amount * $modifier) / $modifier;
    }
public function round($amount, array $currency)
    {
        if (empty($currency['rounding_step'])) {
            return round($amount, $currency['decimals']);
        }

        $modifier = 1 / $currency['rounding_step'];
        return round($amount * $modifier) / $modifier;
    }
public function round ( $ amount , array $ currency ) { if ( empty ( $ currency [ 'rounding_step' ] ) ) { return round ( $ amount , $ currency [ 'decimals' ] ) ; } $ modifier = 1 / $ currency [ 'rounding_step' ] ; return round ( $ amount * $ modifier ) / $ modifier ; }
Rounds an amount
@param integer $amount
@param array $currency
@return integer
Rounds an amount