UNPKG

tough-rational

Version:

Rational class using BigInt with fallback to bignumber.js

7 lines (4 loc) 133 B
'use strict'; const eq = require('./eq'); const gt = require('./gt'); module.exports = (a, b) => eq(a, b) ? 0 : gt(a, b) ? 1 : -1;