Faster and with no module bias Removed rnd_init, rnd_uint32 and rnd_uniform From now on we will only use rnd_value(min, max) for values in range [min, max] and rnd_chance(chance, base) for chances Fixes #7881 Fixes #7883 Fixes #7884 Fixes #7885 Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
12 lines
376 B
C++
12 lines
376 B
C++
// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
|
|
// For more information, see LICENCE in the main folder
|
|
|
|
#include "random.hpp"
|
|
|
|
std::uniform_int_distribution<int32> int31_distribution = std::uniform_int_distribution<int32>(0, SINT32_MAX);
|
|
|
|
/// Generates a random number in the interval [0, SINT32_MAX]
|
|
int32 rnd( void ){
|
|
return int31_distribution( generator );
|
|
}
|