ex02 done
This commit is contained in:
@@ -55,19 +55,33 @@ class Fixed
|
||||
int toInt( void ) const;
|
||||
|
||||
// · Comparison operators
|
||||
bool Fixed::operator<(const Fixed &other);
|
||||
bool Fixed::operator<=(const Fixed &other);
|
||||
bool Fixed::operator>(const Fixed &other);
|
||||
bool Fixed::operator>=(const Fixed &other);
|
||||
bool Fixed::operator==(const Fixed &other);
|
||||
bool Fixed::operator!=(const Fixed &other);
|
||||
bool operator<(const Fixed &other) const;
|
||||
bool operator<=(const Fixed &other) const;
|
||||
bool operator>(const Fixed &other) const;
|
||||
bool operator>=(const Fixed &other) const;
|
||||
bool operator==(const Fixed &other) const;
|
||||
bool operator!=(const Fixed &other) const;
|
||||
|
||||
// · Arithmetic operators
|
||||
Fixed operator+(Fixed const &other) const;
|
||||
Fixed operator-(Fixed const &other) const;
|
||||
Fixed operator*(Fixed const &other) const;
|
||||
Fixed operator/(Fixed const &other) const;
|
||||
|
||||
// · Increments / decrements
|
||||
|
||||
Fixed& operator++();
|
||||
Fixed operator++(int);
|
||||
|
||||
Fixed& operator--();
|
||||
Fixed operator--(int);
|
||||
|
||||
// · Max and min
|
||||
static Fixed& min(Fixed &a, Fixed &b);
|
||||
static const Fixed& min(const Fixed &a, const Fixed &b);
|
||||
|
||||
static Fixed& max(Fixed &a, Fixed &b);
|
||||
static const Fixed& max(const Fixed &a, const Fixed &b);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user