/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Fixed.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: aortigos # include class Fixed { private: int value; static const int fract = 8; public: // Default constructor Fixed(); // Constructor with constant integer Fixed(const int nb); // Constructor with constant floating-point number Fixed(const float nb); // Copy constructor Fixed(const Fixed &other); // Copy assignment operator overload Fixed& operator=(Fixed const &other); // Destructor ~Fixed(); // getRawBits int getRawBits( void ) const; // setRawBits void setRawBits( int const raw ); // toFloat float toFloat( void ) const; // toInt 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); // · Arithmetic operators // · Increments / decrements // · Max and min }; // << operator overload std::ostream& operator<<(std::ostream& os, Fixed const &other); #endif