|
|
@ -301,29 +301,7 @@ public:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public: // comparison operators
|
|
|
|
public: // comparison operators
|
|
|
|
constexpr bool operator==(FixedPoint rhs) const {
|
|
|
|
friend constexpr auto operator<=>(FixedPoint lhs, FixedPoint rhs) = default;
|
|
|
|
return data_ == rhs.data_;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constexpr bool operator!=(FixedPoint rhs) const {
|
|
|
|
|
|
|
|
return data_ != rhs.data_;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constexpr bool operator<(FixedPoint rhs) const {
|
|
|
|
|
|
|
|
return data_ < rhs.data_;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constexpr bool operator>(FixedPoint rhs) const {
|
|
|
|
|
|
|
|
return data_ > rhs.data_;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constexpr bool operator<=(FixedPoint rhs) const {
|
|
|
|
|
|
|
|
return data_ <= rhs.data_;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constexpr bool operator>=(FixedPoint rhs) const {
|
|
|
|
|
|
|
|
return data_ >= rhs.data_;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: // unary operators
|
|
|
|
public: // unary operators
|
|
|
|
constexpr bool operator!() const {
|
|
|
|
constexpr bool operator!() const {
|
|
|
|