UNPKG

tough-rational

Version:

Rational class using BigInt with fallback to bignumber.js

6 lines (3 loc) 105 B
'use strict'; const BN = require('bignumber.js'); module.exports = (a, b) => a.div(new BN(10).pow(b));