From b044a74bd34afdc27baf6241fe398690ff5e043a Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Thu, 25 Oct 2012 22:28:26 -0700 Subject: Bug 634 and 488, Corrected behavior of floor, and added ceiling This is only a partial fix for 634, since rounding is not fixed. --- src/balance.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/balance.h') 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(); -- cgit v1.2.3