rational 0.1.2 rational: ^0.1.2 copied to clipboard
A simple package to deal with rational numbers
Dart Rational #
This project enable to make computations on rational numbers.
Usage #
To use this library in your code :
- add a dependency in your
pubspec.yaml
:
dependencies:
rational: '<1.0.0'
- add import in your
dart
code :
import 'package:rational/rational.dart';
- Start computing using
Rational.parse('1.23')
ornew Rational(12, 7)
.
WARNING #
If you are using this package through dart2js, performances may not be good. This is because dart2js does not implement yet integers with arbitrary precision (see issue 1533) and this package contains a custom implementation of bigint.
License #
Apache 2.0