1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibCrypto: Add SignedBigInteger::is_positive()

This commit is contained in:
Moustafa Raafat 2022-10-22 00:15:42 +01:00 committed by Linus Groh
parent e5a25171fe
commit cfd684dc2f

View file

@ -69,6 +69,7 @@ public:
[[nodiscard]] UnsignedBigInteger const& unsigned_value() const { return m_unsigned_data; }
[[nodiscard]] Vector<u32, STARTING_WORD_SIZE> 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(); }