summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/units.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/units.hh b/src/units.hh
index 8f9172ca..a99957f9 100644
--- a/src/units.hh
+++ b/src/units.hh
@@ -55,6 +55,12 @@ public:
constexpr RealType operator-() { return RealType(-m_value); }
+ constexpr RealType operator%(RealType other) const
+ { return RealType(m_value % other.m_value); }
+
+ constexpr RealType operator%=(RealType other)
+ { m_value %= other.m_value; return static_cast<RealType&>(*this); }
+
constexpr bool operator==(RealType other) const
{ return m_value == other.m_value; }