function Currency::getRoundingStep in Currency 7.2
Returns the rounding step.
Return value
string|false The rounding step as a numeric string, or FALSE if unavailable.
1 call to Currency::getRoundingStep()
- Currency::roundAmount in currency/
includes/ Currency.inc - Rounds an amount.
File
- currency/
includes/ Currency.inc, line 81 - Contains class Currency.
Class
- Currency
- Describes a currency.
Code
function getRoundingStep() {
if (is_numeric($this->rounding_step)) {
return $this->rounding_step;
}
elseif (is_numeric($this->subunits)) {
return $this->subunits > 0 ? currency_divide(1, $this->subunits) : 1;
}
else {
return FALSE;
}
}