You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
esp_random provides a 32 bit random integer so a number between 0 and 4294967295.
Returning a modulo number is biased. For example if howbig is 100, then all numbers between 0 and 95 have the same probability but numbers between 96 and 99 have a lower probability.
The text was updated successfully, but these errors were encountered:
As coded below in Math.cpp, the random number is biased
long random(long howbig)
{
if(howbig == 0) {
return 0;
}
return esp_random() % howbig;
}
esp_random provides a 32 bit random integer so a number between 0 and 4294967295.
Returning a modulo number is biased. For example if howbig is 100, then all numbers between 0 and 95 have the same probability but numbers between 96 and 99 have a lower probability.
The text was updated successfully, but these errors were encountered: