Fix clang-tidy bugprone-incorrect-division warnings

This commit is contained in:
Tim Wojtulewicz 2025-04-16 12:35:18 -07:00
parent 18983aed02
commit 87f1b1a7b3
3 changed files with 5 additions and 6 deletions

View file

@ -60,7 +60,7 @@ void RandTest::add(const void* buf, int bufl) {
montey = 0;
for ( int mj = 0; mj < RT_MONTEN / 2; mj++ ) {
montex = (montex * 256.0) + monte[mj];
montey = (montey * 256.0) + monte[(RT_MONTEN / 2) + mj];
montey = (montey * 256.0) + monte[static_cast<size_t>((RT_MONTEN / 2) + mj)];
}
if ( montex * montex + montey * montey <= RT_INCIRC ) {
inmont++;