diff --git a/ex02/Fixed/Fixed.cpp b/ex02/Fixed/Fixed.cpp index b151a7d..c21d1c1 100644 --- a/ex02/Fixed/Fixed.cpp +++ b/ex02/Fixed/Fixed.cpp @@ -6,7 +6,7 @@ /* By: aortigos value >> this->fract); } + // · Comparison operators + bool Fixed::operator<(const Fixed &other) const { return (this->value < other.getRawBits()); @@ -110,7 +112,9 @@ bool Fixed::operator!=(const Fixed &other) const return (this->value != other.getRawBits()); } + // · Arithmetic operators + Fixed Fixed::operator+(Fixed const &other) const { Fixed res; @@ -152,6 +156,7 @@ Fixed Fixed::operator/(Fixed const &other) const return (res); } + // · Increments / decrements Fixed& Fixed::operator++() @@ -218,4 +223,4 @@ std::ostream& operator<<(std::ostream& os, Fixed const &other) { os << other.toFloat(); return (os); -} \ No newline at end of file +}