mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibCrypto: Add SignedBigInteger::is_positive()
This commit is contained in:
parent
e5a25171fe
commit
cfd684dc2f
Notes:
sideshowbarker
2024-07-17 05:13:29 +09:00
Author: https://github.com/moustafaraafat
Commit: cfd684dc2f
Pull-request: https://github.com/SerenityOS/serenity/pull/15745
Reviewed-by: https://github.com/davidot ✅
Reviewed-by: https://github.com/linusg ✅
1 changed files with 1 additions and 0 deletions
|
@ -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(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue