45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* Fixed.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/09/10 00:54:53 by tigos #+# #+# */
|
|
/* Updated: 2025/09/10 21:56:47 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef FIXED_HPP
|
|
|
|
# define FIXED_HPP
|
|
|
|
# include <iostream>
|
|
|
|
class Fixed
|
|
{
|
|
private:
|
|
int value;
|
|
static const int fract = 8;
|
|
|
|
public:
|
|
// Default constructor
|
|
Fixed();
|
|
|
|
// Copy constructor
|
|
Fixed(Fixed &other);
|
|
|
|
// Copy assignment operator overload
|
|
Fixed& operator=(Fixed const &other);
|
|
|
|
// Destructor
|
|
~Fixed();
|
|
|
|
// getRawBits
|
|
int getRawBits( void ) const;
|
|
|
|
// setRawBits
|
|
void setRawBits( int const raw );
|
|
};
|
|
|
|
#endif |