mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
LibJS: Replace comparisons of "0"_bigint with SignedBigInteger::is_zero
This just avoids creating UnsignedBigInteger's underlying vector.
This commit is contained in:
parent
440d185666
commit
a712c7b5e1
4 changed files with 4 additions and 4 deletions
|
@ -183,7 +183,7 @@ auto modulo(T x, U y) requires(IsArithmetic<T>, IsArithmetic<U>)
|
|||
|
||||
auto modulo(Crypto::BigInteger auto const& x, Crypto::BigInteger auto const& y)
|
||||
{
|
||||
VERIFY(y != "0"_bigint);
|
||||
VERIFY(!y.is_zero());
|
||||
auto result = x.divided_by(y).remainder;
|
||||
if (result.is_negative())
|
||||
result = result.plus(y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue