Fix math bug
This commit is contained in:
parent
1fa7b44c83
commit
97a36a6374
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ function _getCurrencyData (callback) {
|
|||
*/
|
||||
function _carry (amount) {
|
||||
amount.fractional += (amount.decimal % 1) * 100;
|
||||
amount.decimal = Math.floor(amount.decimal + amount.fractional / 100);
|
||||
amount.decimal = Math.floor(amount.decimal) + Math.floor(amount.fractional / 100);
|
||||
amount.fractional = amount.fractional % 100;
|
||||
return amount;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue