Skip to content

Commit 74dac97

Browse files
author
Chris Clark
committed
Add Amount.scale
1 parent 2f2e41c commit 74dac97

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/js/ripple/amount.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict';
1+
'use strict';
22

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

159+
Amount.prototype.scale = function(scaleFactor) {
160+
return this._copy(this._value.times(scaleFactor));
161+
};
162+
159163
Amount.prototype.divide = function(divisor) {
160164
var divisorAmount = Amount.from_json(divisor);
161165
if (!this.is_valid()) {

0 commit comments

Comments
 (0)