UNPKG

@swaptoshi/dex-module

Version:

Klayr decentralized exchange (dex) on-chain module

11 lines 356 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.divRoundingUp = divRoundingUp; const int_1 = require("../int"); function divRoundingUp(x, y) { const z = int_1.Uint256.from(x) .div(y) .add(int_1.Uint256.from(x).mod(y).gt(0) ? 1 : 0); return z.toString(); } //# sourceMappingURL=unsafe_math.js.map