Recreation from original project Fraction.js
Why:
- Try create project that can be package into ES6 module.
- Self learaning.
TODO: Functions to be completed
- Fraction abs()
TODO
- Fraction neg()
TODO
- Fraction add(n) ✅
- Fraction sub(n) ✅
- Fraction mul(n) ✅
- Fraction div(n) ✅
- Fraction pow(exp)
TODO
- Fraction mod(n)
TODO
- Fraction mod()
TODO
- Fraction gcd(n)
TODO
- Fraction lcm(n)
TODO
- Fraction ceil([places=0-16])
TODO
- Fraction floor([places=0-16])
TODO
- Fraction round([places=0-16])
TODO
- Fraction inverse()
TODO
- Fraction simplify([eps=0.001])
TODO
- boolean equals(n)
TODO
- int compare(n)
TODO
- boolean divisible(n)
TODO
- double valueOf()
TODO
- String toString([decimalPlaces=15]) ✅
- String toLatex(excludeWhole=false)
TODO
- String toFraction(excludeWhole=false)
TODO
- Array toContinued()
TODO
- Fraction clone()
TODO
Library: jasmine
npm run test
Library: ts-node
ts-node-esm test1.ts
Copyright (c) 2023, devilkazuya99 Licensed under the MIT license.