UNPKG

@0xtorch/big-decimal

Version:

An arbitrary precision Decimal type for TypeScript that extends BigInt.

8 lines 336 B
export const greaterThan = (x, y) => { // adjust the decimals and values const decimals = Math.max(x.decimals, y.decimals); const valueX = x.value * 10n ** BigInt(decimals - x.decimals); const valueY = y.value * 10n ** BigInt(decimals - y.decimals); return valueX > valueY; }; //# sourceMappingURL=greaterThan.js.map