Skip to content

Question: How good is the randomness? #19

Answered by jaredcat
proactivematter asked this question in Q&A
Discussion options

You must be logged in to vote

Randomness is based on the random algorithm used in the browser that your streaming software used.
In the case of OBS v27.0.1 it uses Javascript V8 engine version 7.4.288.28

Here is the implementation of the random function used by that version of V8: https://chromium.googlesource.com/v8/v8.git/+/refs/tags/7.4.288.28/src/math-random.cc
I can't really get into much more than that myself. This stuff is written by people a lot smarter than me.
Math.random() is a pseudo-random number generator but it should be good enough for this use though.

You could possibly try doubling the randomization (do it twice, add them together, and divide by 2):
j= Math.floor(((Math.random() * (i + 1)) + Math.ra…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jaredcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #18 on September 08, 2021 20:36.