JS: Fix for divide.

This commit is contained in:
Arthur Britto
2012-12-09 00:15:31 -08:00
parent 50aa2df4aa
commit 6e6cbe19af

View File

@@ -589,7 +589,9 @@ Amount.prototype.divide = function (d) {
result = new Amount();
result._value = vn.multiply(consts.bi_1e16).divide(vd);
result._is_negative = this._is_negative != d._is_negative;
if (this._is_negative != d._is_negative)
result._value = result._value.negate();
// XXX Check range?
}