mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-27 23:55:49 +00:00
[CHORE] Currency: JavaScript has Math.exp for e^x, so we should use it.
This commit is contained in:
@@ -179,7 +179,7 @@ Currency.prototype.get_interest_at = function (referenceDate) {
|
||||
referenceDate = utils.fromTimestamp(referenceDate.getTime());
|
||||
}
|
||||
|
||||
return Math.pow(Math.E, (referenceDate - this._interest_start) / this._interest_period);
|
||||
return Math.exp((referenceDate - this._interest_start) / this._interest_period);
|
||||
};
|
||||
|
||||
// XXX Currently we inherit UInt.prototype.is_valid, which is mostly fine.
|
||||
|
||||
Reference in New Issue
Block a user