changeset 8575 | fbda4db54309 |
parent 8434 | 558c39956ba2 |
child 8792 | fab648592d6e |
--- a/src/core/random_func.hpp Sat Feb 16 00:10:03 2008 +0000 +++ b/src/core/random_func.hpp Sat Feb 16 00:46:38 2008 +0000 @@ -88,7 +88,7 @@ static inline bool Chance16I(const uint a, const uint b, const uint32 r) { assert(b != 0); - return (uint16)r < (uint16)((a << 16) / b); + return (uint16)r < (uint16)(((a << 16) + b / 2) / b); } /**