mirror of https://github.com/CGAL/cgal
Add Gmpq::is_zero()
This commit is contained in:
parent
102eb0140a
commit
93fc1aee41
|
|
@ -228,6 +228,12 @@ public:
|
|||
double to_double() const noexcept;
|
||||
Sign sign() const noexcept;
|
||||
|
||||
bool is_zero() const
|
||||
{
|
||||
const __mpz_struct* zn = mpq_numref(mpq());
|
||||
return mpn_zero_p(zn->_mp_d, zn->_mp_size);
|
||||
}
|
||||
|
||||
const mpq_t & mpq() const noexcept { return Ptr()->mpQ; }
|
||||
mpq_t & mpq() noexcept { return ptr()->mpQ; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue