From 1e9d90bdf9ef5fc05093d3449d883597c7f896de Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 8 Nov 2020 13:39:12 +0100 Subject: Added cpp06 boilerplate --- cpp02/ex01/Fixed.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp02/ex01/Fixed.cpp') diff --git a/cpp02/ex01/Fixed.cpp b/cpp02/ex01/Fixed.cpp index 755a6ae..a81c1cf 100644 --- a/cpp02/ex01/Fixed.cpp +++ b/cpp02/ex01/Fixed.cpp @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/13 11:45:18 by charles #+# #+# */ -/* Updated: 2020/10/19 11:29:39 by cacharle ### ########.fr */ +/* Updated: 2020/11/08 13:38:40 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -64,7 +64,7 @@ float Fixed::toFloat() const int Fixed::toInt() const { - return m_value >> m_fractionalBits; + return roundf(toFloat()); } int Fixed::getFractionalBits() -- cgit