From cfd684dc2fd058530b91e70f6068eba0f72bae4c Mon Sep 17 00:00:00 2001 From: Moustafa Raafat Date: Sat, 22 Oct 2022 00:15:42 +0100 Subject: [PATCH] LibCrypto: Add SignedBigInteger::is_positive() --- Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h index d1b79df5cb..a9adba2fd0 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h @@ -69,6 +69,7 @@ public: [[nodiscard]] UnsignedBigInteger const& unsigned_value() const { return m_unsigned_data; } [[nodiscard]] Vector const words() const { return m_unsigned_data.words(); } + [[nodiscard]] bool is_positive() const { return !is_negative() && !is_zero(); } [[nodiscard]] bool is_negative() const { return m_sign; } [[nodiscard]] bool is_zero() const { return m_unsigned_data.is_zero(); }