diff --git a/src/lol/math/polynomial.h b/src/lol/math/polynomial.h index a140314b..e55f4126 100644 --- a/src/lol/math/polynomial.h +++ b/src/lol/math/polynomial.h @@ -274,6 +274,17 @@ struct LOL_ATTR_NODISCARD polynomial return (*this)[degree()]; } + /* Boolean operations */ + bool operator !() const + { + return degree() < 0; + } + + operator bool() const + { + return !!*this; + } + /* Unary plus */ polynomial operator +() const {