Skip to content

Commit

Permalink
Add Amount.scale
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Clark committed Apr 10, 2015
1 parent 2f2e41c commit 74dac97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/ripple/amount.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict';

// Represent Ripple amounts and currencies.
// - Numbers in hex are big-endian.
Expand Down Expand Up @@ -156,6 +156,10 @@ Amount.prototype.multiply = function(multiplicand) {
return this._copy(this._value.times(multiplyBy));
};

Amount.prototype.scale = function(scaleFactor) {
return this._copy(this._value.times(scaleFactor));
};

Amount.prototype.divide = function(divisor) {
var divisorAmount = Amount.from_json(divisor);
if (!this.is_valid()) {
Expand Down

0 comments on commit 74dac97

Please sign in to comment.