1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

LibCrypto: Add missing implementation of SBI::divided_by(USBI)

This commit is contained in:
Linus Groh 2021-07-09 11:48:38 +01:00
parent 3014e529be
commit a216ea4c8d

View file

@ -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());