Skip to content

Commit

Permalink
Use %=
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jan 15, 2024
1 parent ea7330b commit c0cdca5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private int calculateModulus(final String code) throws CheckDigitException {
}
total = (charValue > 9 ? total * 100 : total * 10) + charValue; // CHECKSTYLE IGNORE MagicNumber
if (total > MAX) {
total = total % MODULUS;
total %= MODULUS;
}
}
return (int) (total % MODULUS);
Expand Down

0 comments on commit c0cdca5

Please sign in to comment.