From 0df13661686dfec66aa0d5a8dd88920e1e104fbc Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Wed, 30 Jan 2013 15:35:31 -0700 Subject: Bug 634 Added roundto function, optimized floor and ceiling Fixes Bug634 by adding roundto(amount, places). --- src/value.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/value.h') 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(); -- cgit v1.2.3