mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibCrypto: Add a way to compare UnsignedBigInteger with double
This patch also make SignedBigInteger::compare_to_double make use of the new function.
This commit is contained in:
committed by
Andrew Kaster
parent
e03f014e7a
commit
54b8a2b094
Notes:
sideshowbarker
2024-07-17 04:51:04 +09:00
Author: https://github.com/moustafaraafat Commit: https://github.com/SerenityOS/serenity/commit/54b8a2b094 Pull-request: https://github.com/SerenityOS/serenity/pull/15757 Reviewed-by: https://github.com/davidot ✅
@@ -140,13 +140,7 @@ public:
|
||||
[[nodiscard]] bool operator<(UnsignedBigInteger const& other) const;
|
||||
[[nodiscard]] bool operator>(UnsignedBigInteger const& other) const;
|
||||
|
||||
enum class CompareResult {
|
||||
DoubleEqualsBigInt,
|
||||
DoubleLessThanBigInt,
|
||||
DoubleGreaterThanBigInt
|
||||
};
|
||||
|
||||
[[nodiscard]] CompareResult compare_to_double(double) const;
|
||||
[[nodiscard]] UnsignedBigInteger::CompareResult compare_to_double(double) const;
|
||||
|
||||
private:
|
||||
void ensure_sign_is_valid()
|
||||
|
||||
Reference in New Issue
Block a user