Add fixed point number unary negation operator
This commit is contained in:
parent
3a9ce03318
commit
eb625b846e
@ -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