diff options
author | John Wiegley <johnw@newartisans.com> | 2012-10-26 08:31:57 -0700 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-10-26 08:31:57 -0700 |
commit | 7cee6c559b8198aea9fc75a197bac7bc6e71eaeb (patch) | |
tree | fac4c09dba9035c01a25ad84bc4fd3d12fdaa4f7 /src/balance.h | |
parent | 34ca6b3991d63dd04d60286452399c7e0d49974b (diff) | |
parent | b044a74bd34afdc27baf6241fe398690ff5e043a (diff) | |
download | fork-ledger-7cee6c559b8198aea9fc75a197bac7bc6e71eaeb.tar.gz fork-ledger-7cee6c559b8198aea9fc75a197bac7bc6e71eaeb.tar.bz2 fork-ledger-7cee6c559b8198aea9fc75a197bac7bc6e71eaeb.zip |
Merge pull request #96 from enderw88/Bug634-floor-ceil-round
Bug 634 and 488, Corrected behavior of floor, and added ceiling
Diffstat (limited to 'src/balance.h')
-rw-r--r-- | src/balance.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/balance.h b/src/balance.h index 230a4e2c..9635742d 100644 --- a/src/balance.h +++ b/src/balance.h @@ -345,6 +345,17 @@ public: pair.second.in_place_floor(); } + balance_t ceilinged() const { + balance_t temp(*this); + temp.in_place_ceiling(); + return temp; + } + void in_place_ceiling() { + foreach (amounts_map::value_type& pair, amounts) + pair.second.in_place_ceiling(); + } + + balance_t unrounded() const { balance_t temp(*this); temp.in_place_unround(); |