Add fixed point number unary negation operator
This commit is contained in:
parent
233512f5b4
commit
5fced73f46
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user