CPP02 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Fixed.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* Fixed.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/04/26 22:12:12 by kamitsui #+# #+# */
9/* Updated: 2025/05/06 14:40:18 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
22#ifndef FIXED_HPP
23#define FIXED_HPP
24
28class Fixed {
29 private:
30 int fixedPointValue;
31 static const int fractionalBits = 8;
32
33 public:
37 Fixed();
38
42 Fixed(const Fixed &other);
43
47 Fixed &operator=(const Fixed &other);
48
52 ~Fixed();
53
57 int getRawBits(void) const;
58
62 void setRawBits(int const raw);
63};
64
65#endif
ex00 Fixed Class
Definition Fixed.hpp:28
int getRawBits(void) const
Gets the raw value of the fixed-point number.
Definition Fixed.cpp:73
void setRawBits(int const raw)
Sets the raw value of the fixed-point number.
Definition Fixed.cpp:84
Fixed & operator=(const Fixed &other)
Copy assignment operator.
Definition Fixed.cpp:52
Fixed()
Default constructor.
Definition Fixed.cpp:33
~Fixed()
Destructor.
Definition Fixed.cpp:65