You are here

function currency_add in Currency 7.2

Adds two numbers.

Parameters

int|float|string $number_a:

int|float|string $number_b:

Return value

int|float|string

File

currency/currency.module, line 1007
Provides currency information and allows users to add custom currencies.

Code

function currency_add($number_a, $number_b) {
  if (extension_loaded('bcmath')) {
    return bcadd($number_a, $number_b, CURRENCY_BCMATH_SCALE);
  }
  else {
    return $number_a + $number_b;
  }
}