How to use the max function from bignumber.js
Find comprehensive JavaScript bignumber.js.max code examples handpicked from public code repositorys.
555 556 557 558 559 560 561 562 563 564
logger.debug('PP> worker.sent = %s', worker.sent.toString(10)); worker.balanceChange = BigNumber.min(worker.balance, worker.sent).multipliedBy(new BigNumber(-1)); logger.debug('PP> worker.balanceChange = %s', worker.balanceChange.toString(10)); } else { logger.debug('PP> Worker %s have not reached minimum payout threshold %s', w, minPayment.toString(10)); worker.balanceChange = BigNumber.max(toSend.minus(worker.balance), new BigNumber(0)); logger.debug('PP> worker.balanceChange = %s', worker.balanceChange.toString(10)); worker.sent = new BigNumber(0); logger.debug('PP> worker.sent = %s', worker.sent.toString(10)); if (worker.balanceChange > 0) {
+ 3 other calls in file
bignumber.js.BigNumber is the most popular function in bignumber.js (869 examples)