From a3ff15046fa3d367ff7304dc9482e81597eb76b9 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 19 Oct 2020 11:30:22 +0200 Subject: Fixing cpp02/ex01 float/fixed conversions --- cpp02/ex01/Fixed.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cpp02/ex01/Fixed.hpp') diff --git a/cpp02/ex01/Fixed.hpp b/cpp02/ex01/Fixed.hpp index 2dd2d7d..726b810 100644 --- a/cpp02/ex01/Fixed.hpp +++ b/cpp02/ex01/Fixed.hpp @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/13 11:40:49 by charles #+# #+# */ -/* Updated: 2020/04/13 12:58:33 by charles ### ########.fr */ +/* Updated: 2020/10/19 11:29:30 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ # define FIXED_HPP # include +# include class Fixed { @@ -23,14 +24,14 @@ public: ~Fixed(); void operator=(Fixed const& other); - Fixed(int from); - Fixed(float from); + Fixed(const int from); + Fixed(const float from); - int getRawBits() const; + int getRawBits() const; void setRawBits(int const raw); float toFloat() const; - int toInt() const; + int toInt() const; static int getFractionalBits(); -- cgit