summaryrefslogtreecommitdiff
path: root/indra/llcommon/llbase32.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-11-14 20:29:51 -0500
committerNat Goodspeed <nat@lindenlab.com>2023-11-14 20:29:51 -0500
commitd255c3dda852731b6709ac4e9c9821b3be84ec86 (patch)
treef980cc66f2689564ab2f41ba5e44fe9eaacdcaab /indra/llcommon/llbase32.h
parent6654ad14eed674e894d2903e0f2ea37c4e806c0f (diff)
DRTVWR-588: Try to fix sporadic llrand test failures.
With GitHub viewer builds, every few weeks we've seen test failures when ll_frand() returns exactly 1.0. This is a problem for a function that's supposed to return [0.0 .. 1.0). Monty suggests that the problem is likely to be conversion of F32 to F64 to pass to fmod(), and then truncation of fmod()'s F64 result back to F32. Moved the clamping code to each size-specific ll_internal_random specialization. Monty also noted that a stateful static random number engine isn't thread-safe. Added a mutex lock.
Diffstat (limited to 'indra/llcommon/llbase32.h')
0 files changed, 0 insertions, 0 deletions