diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-11-15 10:12:12 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-11-15 10:12:12 -0500 |
commit | d427d5dbfa09f0bdec743e75a41e8ea0ee4abeea (patch) | |
tree | 47a8f510ef122c4824c18a7aa9e8cd2c804348e5 /indra/llcommon | |
parent | 7670f190827b7d1e1c2a424ec6aa3379cb42ed52 (diff) |
SL-20546: Use narrow() explicit conversion from F64 to F32.
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llrand.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llcommon/llrand.cpp b/indra/llcommon/llrand.cpp index 20e25177f0..702d6b34c9 100644 --- a/indra/llcommon/llrand.cpp +++ b/indra/llcommon/llrand.cpp @@ -93,7 +93,7 @@ inline F32 ll_internal_random<F32>() // Per Monty, it's important to clamp using the correct fmodf() rather // than expanding to F64 for fmod() and then truncating back to F32. Prior // to this change, we were getting sporadic ll_frand() == 1.0 results. - F32 rv{ ll_internal_random_unclamped() }; + F32 rv{ narrow(ll_internal_random_unclamped()) }; if(!((rv >= 0.0) && (rv < 1.0))) return fmodf(rv, 1.0f); return rv; } |