mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibCrypto: Add naive implementation of {Un,}SignedBigInteger::to_double
This commit is contained in:
committed by
Linus Groh
parent
62bc238ac3
commit
bcdad57670
Notes:
sideshowbarker
2024-07-18 04:34:19 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/bcdad576700 Pull-request: https://github.com/SerenityOS/serenity/pull/9859 Reviewed-by: https://github.com/linusg ✅
@@ -112,6 +112,12 @@ u64 UnsignedBigInteger::to_u64() const
|
||||
return value;
|
||||
}
|
||||
|
||||
double UnsignedBigInteger::to_double() const
|
||||
{
|
||||
// FIXME: I am naive
|
||||
return static_cast<double>(to_u64());
|
||||
}
|
||||
|
||||
void UnsignedBigInteger::set_to_0()
|
||||
{
|
||||
m_words.clear_with_capacity();
|
||||
|
||||
Reference in New Issue
Block a user