aboutsummaryrefslogtreecommitdiff
path: root/src/unittest/test_random.cpp
AgeCommit message (Collapse)Author
2020-11-04Revert "Make Lint Happy"Elias Fleckenstein
This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4.
2020-11-04Make Lint HappyElias Fleckenstein
2018-04-02Fix many issues reported by clang-tidy (#7189)Loïc Blot
* Fix many issues reported by clang-tidy We have many issues in code related to some performance to float <-> double. Clang-tidy reported it in performance-type-promotion-in-math-fn I fixed many of them. It's not ready for a promote to blocking Also fix some value which should be const-ref
2015-08-12Fix Lua PcgRandomest31
Before, this lua code led to a crash: local pcg = PcgRandom(42) local value = pcg:next() This was because if you called s32 PcgRandom::range(min, max) with the minimum and maximum possible values for s32 integers (which the lua binding code did), u32 PcgRandom::range(bound) got called with 0 as the bound. The bound however is one above the maximum value, so 0 is a "special" value to pass to this function. This commit fixes the lua crash by assigning the RNG's full range to the bound 0, which is also fits to the "maximum is bound - 1" principle, as (u32)-1 is the maximum value in the u32 range.
2015-05-04Fix GCC compiler warningShadowNinja
2015-04-29Fix MSVC compatibilitykwolekr
Make sure to include random unittests in android builds, too Use SWAP() macro Ensure that negative ranges are tested as well in random unittests
2015-04-29Tests: Add random unittestskwolekr