Add fixed point number unary negation operator

This commit is contained in:
Madeline Busig 2024-08-02 22:07:04 -06:00
parent 233512f5b4
commit 5fced73f46

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