diff options
author | Craig Earls <enderw88@gmail.com> | 2013-01-30 18:56:00 -0800 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-01-30 18:56:00 -0800 |
commit | d9b1258c3480f79a0413cf4c5d07c6818c140503 (patch) | |
tree | c3416c163e9f13b1fdd2a5ccc3400375723e7aac /src/value.h | |
parent | b21ee1de170f99e8ed5c82546c8ae69e209bd8d6 (diff) | |
parent | 0df13661686dfec66aa0d5a8dd88920e1e104fbc (diff) | |
download | fork-ledger-d9b1258c3480f79a0413cf4c5d07c6818c140503.tar.gz fork-ledger-d9b1258c3480f79a0413cf4c5d07c6818c140503.tar.bz2 fork-ledger-d9b1258c3480f79a0413cf4c5d07c6818c140503.zip |
Merge pull request #140 from enderw88/Bug634-floor-ceil-round
Bug 634 Added roundto function, optimized floor and ceiling
Diffstat (limited to 'src/value.h')
-rw-r--r-- | src/value.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/value.h b/src/value.h index 249f3d7f..49d64ab6 100644 --- a/src/value.h +++ b/src/value.h @@ -443,6 +443,13 @@ public: } void in_place_round(); + value_t roundto(int places) const { + value_t temp(*this); + temp.in_place_roundto(places); + return temp; + } + void in_place_roundto(int places); + value_t truncated() const { value_t temp(*this); temp.in_place_truncate(); |