@terra-dev/big-math
v0.20.1
Published
Math library for [big.js](https://github.com/MikeMcl/big.js/)
Downloads
16
Readme
@terra-dev/big-math
Math library for big.js
API
export function min(...numbers: BigSource[]): Big {}
export function max(...numbers: BigSource[]): Big {}
export function floor(number: BigSource): Big {}
Spec
import { floor, max, min } from '@terra-dev/big-math';
import big from 'big.js';
describe('big-math', () => {
test('should get the minimum / maximum numbers', () => {
expect(min(10, '4', big('8')).toString()).toBe('4');
expect(max(10, '4', big('8')).toString()).toBe('10');
expect(floor(big('10.343434')).toString()).toBe('10');
});
});