diff options
Diffstat (limited to 'Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp')
-rw-r--r-- | Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp index 795d238eea..8c6de49b61 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp @@ -156,6 +156,15 @@ FLATTEN SignedBigInteger SignedBigInteger::multiplied_by(UnsignedBigInteger cons return { unsigned_value().multiplied_by(other), m_sign }; } +FLATTEN SignedDivisionResult SignedBigInteger::divided_by(UnsignedBigInteger const& divisor) const +{ + auto division_result = unsigned_value().divided_by(divisor); + return { + { move(division_result.quotient), m_sign }, + { move(division_result.remainder), m_sign }, + }; +} + FLATTEN SignedBigInteger SignedBigInteger::bitwise_or(const SignedBigInteger& other) const { auto result = bitwise_or(other.unsigned_value()); |