UNPKG

tough-rational

Version:

Rational class using BigInt with fallback to bignumber.js

8 lines (5 loc) 239 B
'use strict' const dividedBy = require('./divided-by'); const fractionalComponent = require('./fractional-component'); const multiply = require('./multiply'); module.exports = (a, b) => multiply(fractionalComponent(dividedBy(a, b)), b);