You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
3 years ago
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* Fixed.hpp :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2022/06/20 10:06:37 by narnaud #+# #+# */
|
||
|
/* Updated: 2022/06/20 10:38:33 by narnaud ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <iostream>
|
||
|
|
||
|
class Fixed {
|
||
|
|
||
|
public:
|
||
|
|
||
|
Fixed (void);
|
||
|
Fixed (const int init_val);
|
||
|
Fixed (Fixed const & src);
|
||
|
~Fixed (void);
|
||
|
Fixed & operator= (Fixed const & src);
|
||
|
int getRawBits(void) const;
|
||
|
void setRawBits(int const raw);
|
||
|
private:
|
||
|
int _raw_bits;
|
||
|
static const int _fract_bits;
|
||
|
|
||
|
};
|