summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--number.cpp8
-rw-r--r--number.h7
2 files changed, 15 insertions, 0 deletions
diff --git a/number.cpp b/number.cpp
index 074c4dc..02d655d 100644
--- a/number.cpp
+++ b/number.cpp
@@ -316,6 +316,14 @@ number::operator+=(const number &n)
}
number &
+number::operator*=(const number &n)
+{
+ *this = *this * n;
+
+ return *this;
+}
+
+number &
number::operator<<=(std::uint32_t n)
{
*this = *this << n;
diff --git a/number.h b/number.h
index d0d2a10..07df60f 100644
--- a/number.h
+++ b/number.h
@@ -140,6 +140,13 @@ public:
number &operator+=(const number &n);
/**
+ * \brief Multiply a number with this number.
+ *
+ * \param n Number with multiply to this number.
+ */
+ number &operator*=(const number &n);
+
+ /**
* \brief Shift the number n bits to the left.
*
* \param n Number of bits to shift.