absorbe
This commit is contained in:
29
ex02/src/Fixed.hpp
Normal file
29
ex02/src/Fixed.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef FIXED_H
|
||||
# define FIXED_H
|
||||
|
||||
# include <ostream>
|
||||
|
||||
class Fixed
|
||||
{
|
||||
private:
|
||||
int _value;
|
||||
static const int _nb_bits = 8;
|
||||
|
||||
public:
|
||||
Fixed();
|
||||
Fixed(const Fixed& src);
|
||||
Fixed(const int &n);
|
||||
Fixed(const float &f);
|
||||
~Fixed();
|
||||
|
||||
Fixed &operator=(const Fixed& src);
|
||||
|
||||
int getRawBits( void ) const;
|
||||
void setRawBits( int const raw );
|
||||
float toFloat(void) const ;
|
||||
int toInt(void) const ;
|
||||
};
|
||||
|
||||
std::ostream& operator << (std::ostream &out, const Fixed& fixed);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user