summaryrefslogtreecommitdiff
path: root/src/amount.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/amount.h')
-rw-r--r--src/amount.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/amount.h b/src/amount.h
index 0c849017..006c554a 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -377,8 +377,20 @@ public:
return *this;
}
- amount_t round() const;
- amount_t round(precision_t prec) const;
+ amount_t round() const {
+ amount_t temp(*this);
+ temp.in_place_round();
+ return temp;
+ }
+ amount_t& in_place_round();
+
+ amount_t round(precision_t prec) const {
+ amount_t temp(*this);
+ temp.in_place_round(prec);
+ return temp;
+ }
+ amount_t& in_place_round(precision_t prec);
+
amount_t unround() const;
amount_t reduce() const {