diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-11-17 10:24:14 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-11-17 10:24:14 -0500 |
commit | e7ae20c96fccdad06e39a3f8e5fe61a812029242 (patch) | |
tree | 71f745a154dd93b6127028d4d79d2d2a33c15819 /indra | |
parent | 1c71a8e78e37d8605e009d623a5281ab4b509350 (diff) |
SL-20546: Avoid promoting F32 to double just to compare bounds.
Diffstat (limited to 'indra')
-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 702d6b34c9..8206bf8e0c 100644 --- a/indra/llcommon/llrand.cpp +++ b/indra/llcommon/llrand.cpp @@ -94,7 +94,7 @@ inline F32 ll_internal_random<F32>() // 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{ narrow(ll_internal_random_unclamped()) }; - if(!((rv >= 0.0) && (rv < 1.0))) return fmodf(rv, 1.0f); + if(!((rv >= 0.0f) && (rv < 1.0f))) return fmodf(rv, 1.0f); return rv; } |