[mythtv-commits] [MythTV/mythtv] 079a8d: replace QRandomGenerator with MythRandom
Scott Theisen
noreply at github.com
Sun Jan 22 20:23:22 UTC 2023
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 079a8d74a1ae62eb3742844051b87772dde18010
https://github.com/MythTV/mythtv/commit/079a8d74a1ae62eb3742844051b87772dde18010
Author: Scott Theisen <scott.the.elm at gmail.com>
Date: 2023-01-22 (Sun, 22 Jan 2023)
Changed paths:
M mythtv/programs/mythfrontend/gallerytransitions.cpp
M mythtv/programs/mythfrontend/galleryviews.cpp
Log Message:
-----------
replace QRandomGenerator with MythRandom
Generating uniform random floating point numbers is problematic
and best avoided, but that change is for later.
Commit: d7daab293b0a291137dd2dee14401833af4fd73a
https://github.com/MythTV/mythtv/commit/d7daab293b0a291137dd2dee14401833af4fd73a
Author: Scott Theisen <scott.the.elm at gmail.com>
Date: 2023-01-22 (Sun, 22 Jan 2023)
Changed paths:
M mythtv/programs/mythfrontend/galleryviews.cpp
Log Message:
-----------
mythfrontend/galleryviews.cpp: replace floating point random numbers
with fixed point
Generating uniformly random floating point values is difficult and
most implementations are currently bugged and may return the upper
bound when they are supposed to be half open intervals.
Instead, scale the `double`s to `uint32_t`s and use uniformly random
integers.
Compare: https://github.com/MythTV/mythtv/compare/0bf9ebba3f98...d7daab293b0a
More information about the mythtv-commits
mailing list