mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibCrypto: Add operator<= and operator>= to SignedBigInteger
This commit is contained in:
parent
121e7626d0
commit
ff6ca0f02d
2 changed files with 12 additions and 0 deletions
|
@ -280,9 +280,19 @@ bool SignedBigInteger::operator<(const SignedBigInteger& other) const
|
|||
return m_unsigned_data < other.m_unsigned_data;
|
||||
}
|
||||
|
||||
bool SignedBigInteger::operator<=(const SignedBigInteger& other) const
|
||||
{
|
||||
return *this < other || *this == other;
|
||||
}
|
||||
|
||||
bool SignedBigInteger::operator>(const SignedBigInteger& other) const
|
||||
{
|
||||
return *this != other && !(*this < other);
|
||||
}
|
||||
|
||||
bool SignedBigInteger::operator>=(const SignedBigInteger& other) const
|
||||
{
|
||||
return !(*this < other);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue