diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp index 8c6de49b61..3d6bdffa55 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp @@ -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); +} + } diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h index b3adcdb8bb..099348bfd7 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h @@ -121,7 +121,9 @@ public: bool operator==(const SignedBigInteger& other) const; bool operator!=(const SignedBigInteger& other) const; bool operator<(const SignedBigInteger& other) const; + bool operator<=(const SignedBigInteger& other) const; bool operator>(const SignedBigInteger& other) const; + bool operator>=(const SignedBigInteger& other) const; bool operator==(const UnsignedBigInteger& other) const; bool operator!=(const UnsignedBigInteger& other) const;