/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   Fixed.hpp                                          :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: adjoly <adjoly@student.42angouleme.fr>     +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2024/11/09 19:23:08 by adjoly            #+#    #+#             */
/*   Updated: 2024/11/19 16:27:15 by adjoly           ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#pragma once

#include <iostream>

class	Fixed {
	private:
		int					_number;
		static const int	_fractBit = 8;
	public:
		Fixed(void);
		Fixed(const int nbr);
		Fixed(const float nbr);
		Fixed(const Fixed& cpy);
		Fixed& operator=(const Fixed&);

		~Fixed(void);

		int		toInt(void) const;
		float	toFloat(void) const;

		int		getRawBits( void ) const;
		void	setRawBits( int const raw );
};

std::ostream	&operator<<(std::ostream &file, Fixed const &fixed);