mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-24 06:55:19 -07:00
Formatting of Rational function order
This commit is contained in:
parent
dde5f59dc2
commit
9d7cc0efa8
2 changed files with 7 additions and 8 deletions
|
@ -378,12 +378,7 @@ namespace CalcEngine
|
||||||
lhs ^= rhs;
|
lhs ^= rhs;
|
||||||
return lhs;
|
return lhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Rational::IsZero() const
|
|
||||||
{
|
|
||||||
return this->P().IsZero();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator==(Rational const& lhs, Rational const& rhs)
|
bool operator==(Rational const& lhs, Rational const& rhs)
|
||||||
{
|
{
|
||||||
PRAT lhsRat = lhs.ToPRAT();
|
PRAT lhsRat = lhs.ToPRAT();
|
||||||
|
@ -450,6 +445,11 @@ namespace CalcEngine
|
||||||
return !(lhs < rhs);
|
return !(lhs < rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Rational::IsZero() const
|
||||||
|
{
|
||||||
|
return this->P().IsZero();
|
||||||
|
}
|
||||||
|
|
||||||
wstring Rational::ToString(uint32_t radix, NUMOBJ_FMT fmt, int32_t precision) const
|
wstring Rational::ToString(uint32_t radix, NUMOBJ_FMT fmt, int32_t precision) const
|
||||||
{
|
{
|
||||||
PRAT rat = this->ToPRAT();
|
PRAT rat = this->ToPRAT();
|
||||||
|
|
|
@ -56,8 +56,6 @@ namespace CalcEngine
|
||||||
friend Rational operator|(Rational lhs, Rational const& rhs);
|
friend Rational operator|(Rational lhs, Rational const& rhs);
|
||||||
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);
|
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);
|
||||||
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;
|
std::wstring ToString(uint32_t radix, NUMOBJ_FMT format, int32_t precision) const;
|
||||||
uint64_t ToUInt64_t() const;
|
uint64_t ToUInt64_t() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue