Nothing done
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/10 00:54:50 by tigos #+# #+# */
|
/* Created: 2025/09/10 00:54:50 by tigos #+# #+# */
|
||||||
/* Updated: 2025/09/12 13:08:05 by aortigos ### ########.fr */
|
/* Updated: 2025/09/12 13:13:00 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -79,7 +79,9 @@ int Fixed::toInt( void ) const
|
|||||||
return (this->value >> this->fract);
|
return (this->value >> this->fract);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// · Comparison operators
|
// · Comparison operators
|
||||||
|
|
||||||
bool Fixed::operator<(const Fixed &other) const
|
bool Fixed::operator<(const Fixed &other) const
|
||||||
{
|
{
|
||||||
return (this->value < other.getRawBits());
|
return (this->value < other.getRawBits());
|
||||||
@@ -110,7 +112,9 @@ bool Fixed::operator!=(const Fixed &other) const
|
|||||||
return (this->value != other.getRawBits());
|
return (this->value != other.getRawBits());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// · Arithmetic operators
|
// · Arithmetic operators
|
||||||
|
|
||||||
Fixed Fixed::operator+(Fixed const &other) const
|
Fixed Fixed::operator+(Fixed const &other) const
|
||||||
{
|
{
|
||||||
Fixed res;
|
Fixed res;
|
||||||
@@ -152,6 +156,7 @@ Fixed Fixed::operator/(Fixed const &other) const
|
|||||||
return (res);
|
return (res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// · Increments / decrements
|
// · Increments / decrements
|
||||||
|
|
||||||
Fixed& Fixed::operator++()
|
Fixed& Fixed::operator++()
|
||||||
@@ -218,4 +223,4 @@ std::ostream& operator<<(std::ostream& os, Fixed const &other)
|
|||||||
{
|
{
|
||||||
os << other.toFloat();
|
os << other.toFloat();
|
||||||
return (os);
|
return (os);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user