add: ex02
This commit is contained in:
@ -18,10 +18,32 @@ class Fixed
|
||||
|
||||
Fixed &operator=(const Fixed& src);
|
||||
|
||||
bool operator<(const Fixed& src);
|
||||
bool operator>(const Fixed& src);
|
||||
bool operator>=(const Fixed& src);
|
||||
bool operator<=(const Fixed& src);
|
||||
bool operator==(const Fixed& src);
|
||||
bool operator!=(const Fixed& src);
|
||||
|
||||
Fixed operator-(const Fixed& src);
|
||||
Fixed operator+(const Fixed& src);
|
||||
Fixed operator*(const Fixed& src);
|
||||
Fixed operator/(const Fixed& src);
|
||||
|
||||
|
||||
Fixed &operator++();
|
||||
Fixed &operator--();
|
||||
Fixed operator++(int);
|
||||
Fixed operator--(int);
|
||||
|
||||
int getRawBits( void ) const;
|
||||
void setRawBits( int const raw );
|
||||
float toFloat(void) const ;
|
||||
int toInt(void) const ;
|
||||
static const Fixed& max(const Fixed& f1, const Fixed& f2);
|
||||
static Fixed& max(Fixed& f1, Fixed& f2);
|
||||
static const Fixed& min(const Fixed& f1, const Fixed& f2);
|
||||
static Fixed& min(Fixed& f1, Fixed& f2);
|
||||
};
|
||||
|
||||
std::ostream& operator << (std::ostream &out, const Fixed& fixed);
|
||||
|
Reference in New Issue
Block a user