a14n / dart-rational

Apache License 2.0
35 stars 20 forks source link

Added precision-related getters #9

Closed stevenroose closed 10 years ago

stevenroose commented 10 years ago

Created getters hasFinitePrecision, precision and scale.

Also provided tests to verify the workings of the implementation.

I really broke my head on this, just to realize that toDecimalString() had part of the implementation already in it. I changed it to use the getters to avoid code duplication.

stevenroose commented 10 years ago

I created a PR in Decimal too to incorporate these getters: https://github.com/a14n/dart-decimal/pull/10

a14n commented 10 years ago

Thanks

a14n commented 10 years ago

Published in v0.1.8