mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Various random code cleanups
This commit is contained in:
parent
358658fa34
commit
7892541383
73 changed files with 216 additions and 285 deletions
|
@ -80,7 +80,7 @@ void TestRandom::testPseudoRandomRange()
|
|||
s32 min = (pr.next() % 3000) - 500;
|
||||
s32 max = (pr.next() % 3000) - 500;
|
||||
if (min > max)
|
||||
SWAP(s32, min, max);
|
||||
std::swap(min, max);
|
||||
|
||||
s32 randval = pr.range(min, max);
|
||||
UASSERT(randval >= min);
|
||||
|
@ -120,7 +120,7 @@ void TestRandom::testPcgRandomRange()
|
|||
s32 min = (pr.next() % 3000) - 500;
|
||||
s32 max = (pr.next() % 3000) - 500;
|
||||
if (min > max)
|
||||
SWAP(s32, min, max);
|
||||
std::swap(min, max);
|
||||
|
||||
s32 randval = pr.range(min, max);
|
||||
UASSERT(randval >= min);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue