From fbb0d2583173073e11976c7cd7e570d4829f0621 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 Feb 2009 02:15:27 -0400 Subject: Gave round/unround/truncate all in_place_ variants --- src/value.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'src/value.h') diff --git a/src/value.h b/src/value.h index 4d019450..35d7f6a8 100644 --- a/src/value.h +++ b/src/value.h @@ -409,9 +409,26 @@ public: value_t abs() const; - value_t rounded() const; - value_t truncated() const; - value_t unrounded() const; + value_t rounded() const { + value_t temp(*this); + temp.in_place_round(); + return temp; + } + void in_place_round(); + + value_t truncated() const { + value_t temp(*this); + temp.in_place_truncate(); + return temp; + } + void in_place_truncate(); + + value_t unrounded() const { + value_t temp(*this); + temp.in_place_unround(); + return temp; + } + void in_place_unround(); value_t reduced() const { value_t temp(*this); -- cgit v1.2.3