diff options
| author | gifnksm <makoto.nksm+github@gmail.com> | 2013-10-24 22:42:55 +0900 |
|---|---|---|
| committer | gifnksm <makoto.nksm+github@gmail.com> | 2013-10-24 23:05:03 +0900 |
| commit | 7d5c7b8083acc8fe6bb466bb11c60d597384f978 (patch) | |
| tree | cea5a12a124da58f30802c21b41c842fcae3daf6 /src/rt/sync/rust_thread.cpp | |
| parent | 7075eb36254e673fad1055148ee1a02447371215 (diff) | |
| download | rust-7d5c7b8083acc8fe6bb466bb11c60d597384f978.tar.gz rust-7d5c7b8083acc8fe6bb466bb11c60d597384f978.zip | |
extra: Add getter methods to extra::rational::Ratio
After merging 0ada7c7, user code have not been able to access to `Ratio`'s numerator and denominator fields. In some algorithms, it is needed to get an rational number's numerator or denominator, but keeping these fields private is necessary for guaranteeing that `Ratio` numbers are irreducible. So, I added the getter methods `numer()` and `denom()`. As a bonus, this commit adds utility methods relating to the ratio-integer conversion.
Diffstat (limited to 'src/rt/sync/rust_thread.cpp')
0 files changed, 0 insertions, 0 deletions
