Add fixed point number unary negation operator

This commit is contained in:
Myles Busig 2024-08-02 22:07:04 -06:00
parent 3a9ce03318
commit eb625b846e

View File

@ -117,6 +117,9 @@ public:
constexpr fixed operator-(fixed rhs) const {
return from_raw(x - rhs.x);
}
constexpr fixed operator-() const {
return from_raw(-x);
}
/**
* \brief Fixed point multiplication