1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:27:34 +00:00

LibCrypto: Add a constructor to (Un)SignedBigInteger taking a double

For now this will assume that the double given is exactly representable
as an integer, so no NaN, infinity or rounding.
This commit is contained in:
davidot 2022-08-25 23:37:09 +02:00 committed by Linus Groh
parent c87d10365b
commit 528891bf69
5 changed files with 161 additions and 8 deletions

View file

@ -43,6 +43,8 @@ public:
{
}
explicit SignedBigInteger(double value);
[[nodiscard]] static SignedBigInteger create_invalid()
{
return { UnsignedBigInteger::create_invalid(), false };