summaryrefslogtreecommitdiff
path: root/src/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.h')
-rw-r--r--src/value.h23
1 files changed, 20 insertions, 3 deletions
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);