Formatting of Rational function order

This commit is contained in:
Josh Koon 2019-02-21 16:48:57 -08:00
commit 9d7cc0efa8
2 changed files with 7 additions and 8 deletions

View file

@ -378,12 +378,7 @@ namespace CalcEngine
lhs ^= rhs;
return lhs;
}
bool Rational::IsZero() const
{
return this->P().IsZero();
}
bool operator==(Rational const& lhs, Rational const& rhs)
{
PRAT lhsRat = lhs.ToPRAT();
@ -450,6 +445,11 @@ namespace CalcEngine
return !(lhs < rhs);
}
bool Rational::IsZero() const
{
return this->P().IsZero();
}
wstring Rational::ToString(uint32_t radix, NUMOBJ_FMT fmt, int32_t precision) const
{
PRAT rat = this->ToPRAT();

View file

@ -56,8 +56,6 @@ namespace CalcEngine
friend Rational operator|(Rational lhs, Rational const& rhs);
friend Rational operator^(Rational lhs, Rational const& rhs);
bool IsZero() const;
friend bool operator==(Rational const& lhs, Rational const& rhs);
friend bool operator!=(Rational const& lhs, Rational const& rhs);
friend bool operator<(Rational const& lhs, Rational const& rhs);
@ -65,6 +63,7 @@ namespace CalcEngine
friend bool operator<=(Rational const& lhs, Rational const& rhs);
friend bool operator>=(Rational const& lhs, Rational const& rhs);
bool IsZero() const;
std::wstring ToString(uint32_t radix, NUMOBJ_FMT format, int32_t precision) const;
uint64_t ToUInt64_t() const;